<template>

    <div>
        <div>
            <el-form :model="form" :rules="rules" ref="form" class="demo-ruleForm" :inline="true" size="mini">
                <el-tabs>
                    <el-tab-pane label="房源资料">
                        <!-- 房源 -->
                        
                            <!-- 房屋信息  85 -->
                            <div class="row">
                                <el-form-item label="市">
                                    <el-select v-model="options.city_name" placeholder="市" disabled>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="区">
                                    <!-- <el-select v-model="form.a_id" placeholder="区">
                                        <el-option v-for="(item,index) in options.area_list" :key="index" :label="item.name" :value="item.code"></el-option>
                                    </el-select> -->
                                    <el-select v-model="options.area_name" placeholder="区" disabled>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="楼盘字典" prop="building_id">
                                    <el-autocomplete v-model="form.building_id" :fetch-suggestions="buildingquerySearchAsync" placeholder="请输入" @select="lpzdhandleSelect" @blur="lpzdblur" :select-when-unmatched="true" :trigger-on-focus="false" :hide-loading="true" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_loupanzidian) == -1"></el-autocomplete>
                                </el-form-item>
                                
                                <el-form-item label="栋座/位置" prop="few_building" class="small_inp">
                                    <el-autocomplete v-model="form.few_building" :fetch-suggestions="fewFun" placeholder="请输入" @select="dzhandleSelect" @blur="dzblur" :select-when-unmatched="true" :hide-loading="true" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_dongzuo) == -1"></el-autocomplete>
                                </el-form-item>_
                                <el-form-item label="" prop="position" class="small_inp">
                                    <el-autocomplete v-model="form.position" :fetch-suggestions="unitFun" placeholder="请输入" @select="wzhandleSelect" @blur="wzdblur" :select-when-unmatched="true" :hide-loading="true" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_weizhi) == -1"></el-autocomplete>
                                </el-form-item>
                                <el-form-item label="房号" prop="room_number" class="small_inp" >
                                    <el-input v-model="form.room_number" @blur="fhblur" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fanghao) == -1"></el-input>
                                </el-form-item>

                                <el-form-item label="楼层" prop="floor" class="small_inp">
                                    <el-input v-model="form.floor" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_louceng) == -1"></el-input>
                                </el-form-item>

                                <el-form-item label="总层" prop="total_layer" class="small_inp">
                                    <el-input v-model="form.total_layer" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_zongceng) == -1"></el-input>
                                </el-form-item>

                                <el-form-item label="用途" prop="use_type">
                                    <el-select v-model="form.use_type" placeholder="请选择" @change="typeChange" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_yongtu) == -1">
                                        <el-option v-for="(item,index) in options.use" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>

                                <el-form-item label="房型" prop="room_s" class="mini_inp" v-if="typeOne === 1">
                                    <el-select v-model="form.r_info.room_s" placeholder=""  @focus="room_s_onkeypress($event)" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangxing) == -1">
                                        <el-option v-for="(item,index) in options.roomtype" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>室
                                </el-form-item>
                                <el-form-item label="" prop="office_s" class="mini_inp" v-if="typeOne === 1">
                                    <el-select v-model="form.r_info.office_s" placeholder=""  @focus="office_s_onkeypress($event)" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangxing) == -1">
                                        <el-option v-for="(item,index) in options.hall" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                    </el-select>厅
                                </el-form-item>
                                <el-form-item label="" prop="guard_s" class="mini_inp" v-if="typeOne === 1">
                                    <el-select v-model="form.r_info.guard_s" placeholder="" @focus="guard_s_onkeypress($event)" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangxing) == -1">
                                        <el-option v-for="(item,index) in options.guard" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                    </el-select>卫
                                </el-form-item>
                                <el-form-item label="" prop="balcony_s" class="mini_inp" v-if="typeOne === 1">
                                    <el-select v-model="form.r_info.balcony_s" placeholder="" @focus="balcony_s_onkeypress($event)" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangxing) == -1">
                                        <el-option v-for="(item,index) in options.balcony" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>阳台
                                </el-form-item>

                                <el-form-item label="位置" prop="position" v-if="typeOne === 2">
                                    <el-select v-model="form.r_info.position" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.spw_position" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="位置" prop="position" v-if="typeOne === 7">
                                    <el-select v-model="form.r_info.position" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.c_position" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                    </el-select>
                                </el-form-item>

                                <el-form-item label="进深" prop="depth_s" class="small_inp" v-if="typeOne === 2">
                                    <el-input v-model="form.r_info.depth_s" style="vertical-align: top;"></el-input>米
                                </el-form-item>

                                <el-form-item label="规划" prop="plan_s" class="small_inp" v-if="typeOne === 6">
                                    <el-input v-model="form.r_info.plan_s" style="vertical-align: top;"></el-input>
                                </el-form-item>

                                <el-form-item label="长度" prop="length_s" class="small_inp" v-if="typeOne === 6 || typeOne === 7">
                                    <el-input v-model="form.r_info.length_s" style="vertical-align: top;"></el-input>米
                                </el-form-item>

                                <el-form-item label="宽度" prop="width_s" class="small_inp" v-if="typeOne === 6 || typeOne === 7">
                                    <el-input v-model="form.r_info.width_s" style="vertical-align: top;"></el-input>
                                </el-form-item>

                                <el-form-item label="级别" prop="level_s" v-if="typeOne === 3">
                                    <el-select v-model="form.r_info.level_s" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.level" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                    </el-select>
                                </el-form-item>

                                <el-form-item label="实率" prop="real_rate" class="small_inp" v-if="typeOne === 3">
                                    <el-input v-model="form.r_info.real_rate" style="vertical-align: top;"></el-input>%
                                </el-form-item>

                                <el-form-item label="层高" prop="layer_height" class="small_inp" v-if="typeOne === 2 || typeOne === 3">
                                    <el-input v-model="form.r_info.layer_height" style="vertical-align: top;"></el-input>
                                </el-form-item>

                                <el-form-item label="厂房" prop="workshop_s" class="small_inp" v-if="typeOne === 4">
                                    <el-input v-model="form.r_info.workshop_s"></el-input>
                                </el-form-item>
                                <el-form-item label="仓库" prop="warehouse_s" class="small_inp" v-if="typeOne === 5">
                                    <el-input v-model="form.r_info.warehouse_s"></el-input>
                                </el-form-item>
                                <el-form-item label="宿舍" prop="dormitory_s" class="small_inp" v-if="typeOne === 4 || typeOne === 5">
                                    <el-input v-model="form.r_info.dormitory_s"></el-input>
                                </el-form-item>
                                <el-form-item label="长" prop="unit_length" class="small_inp" v-if="typeOne === 4 || typeOne === 5">
                                    <el-input v-model="form.r_info.unit_length"></el-input>
                                </el-form-item>
                                <el-form-item label="宽" prop="unit_width" class="small_inp" v-if="typeOne === 4 || typeOne === 5">
                                    <el-input v-model="form.r_info.unit_width"></el-input>
                                </el-form-item>
                                <el-form-item label="高" prop="unit_height" class="small_inp" v-if="typeOne === 4 || typeOne === 5">
                                    <el-input v-model="form.r_info.unit_height"></el-input>
                                </el-form-item>

                                <el-form-item label="面积" prop="r_acreage" class="small_inp" v-if="typeOne === 1 || typeOne === 2 || typeOne === 3 || typeOne === 6 || typeOne === 7">
                                    <el-input type="number" v-model="form.r_acreage" style="vertical-align: top;" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_mianji) == -1"></el-input>m<sup>2</sup>
                                </el-form-item>

                                <el-form-item label="套内" prop="inside" class="small_inp" v-if="typeOne === 1 || typeOne === 3 || typeOne === 6">
                                    <el-input type="number" v-model="form.r_info.inside" style="vertical-align: top;"></el-input>m<sup>2</sup>
                                </el-form-item>

                                <el-form-item label="门宽" prop="gate_width" class="small_inp" v-if="typeOne === 2">
                                    <el-input v-model="form.r_info.gate_width" style="vertical-align: top;"></el-input>米
                                </el-form-item>
                                <el-form-item label="办公" prop="work_office" class="small_inp" v-if="typeOne === 4 || typeOne === 5">
                                    <el-input v-model="form.r_info.work_office"></el-input>
                                </el-form-item>
                                <el-form-item label="空地" prop="vacant_land" class="small_inp" v-if="typeOne === 4 || typeOne === 5">
                                    <el-input v-model="form.r_info.vacant_land"></el-input>
                                </el-form-item>
                                <el-form-item label="总计" prop="unit_total" class="small_inp" v-if="typeOne === 4 || typeOne === 5">
                                    <el-input v-model="form.r_info.unit_total"></el-input>
                                </el-form-item>

                                <el-form-item label="层数" prop="number_layers" v-if="typeOne === 2 || typeOne === 3 || typeOne === 4 || typeOne === 5">
                                    <el-select v-model="form.r_info.number_layers" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.numlayers" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                    </el-select>
                                </el-form-item>

                                <el-form-item label="朝向" prop="orientation" v-if="typeOne === 1">
                                    <el-select v-model="form.r_info.orientation" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.oriented" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                    </el-select>
                                </el-form-item>

                                <el-form-item label="状况" prop="current_situation" class="small_inp" v-if="typeOne === 6">
                                    <el-input v-model="form.r_info.current_situation" style="vertical-align: top;"></el-input>
                                </el-form-item>

                                <el-form-item label="包月" prop="monthly_package" class="small_inp" v-if="typeOne === 7">
                                    <el-input v-model="form.r_info.monthly_package" style="vertical-align: top;"></el-input>
                                </el-form-item>

                                <el-form-item label="排量" prop="displacement" v-if="typeOne === 7">
                                    <el-select v-model="form.r_info.displacement" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.displacement" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                    </el-select>
                                </el-form-item>

                                <el-form-item label="类型" prop="housing_types" v-if="typeOne === 1">
                                    <el-select v-model="form.housing_types" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.zsq_type" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="类型" prop="housing_types" v-if="typeOne === 2">
                                    <el-select v-model="form.housing_types" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.spw_type" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="类型" prop="housing_types" v-if="typeOne === 3">
                                    <el-select v-model="form.housing_types" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.xx_type" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="类型" prop="housing_types" v-if="typeOne === 4 || typeOne === 5">
                                    <el-select v-model="form.housing_types" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.cc_type" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="类型" prop="housing_types" v-if="typeOne === 6">
                                    <el-select v-model="form.housing_types" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.dp_type" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="类型" prop="housing_types" v-if="typeOne === 7">
                                    <el-select v-model="form.housing_types" placeholder="请选择">
                                        <el-option v-for="(item,index) in options.c_type" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>


                                <el-form-item label="出售类型" prop="type_of_house_sale">
                                    <el-select v-model="form.type_of_house_sale" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_chushouleixing) == -1">
                                        <el-option v-for="(item,index) in options.optimal" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item label="建房年代" prop="building_s">
                                    <el-select v-model="form.building_s" placeholder="请选择" :disabled="true">
                                    </el-select>
                                    <!-- <el-autocomplete v-model="form.building_s" :fetch-suggestions="building_sFun" placeholder="请输入" :select-when-unmatched="true" :hide-loading="true"></el-autocomplete> -->
                                </el-form-item>
                                <el-form-item label="盘类型" prop="disc_type">
                                    <el-select v-model="form.disc_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_panleixing) == -1">
                                        <el-option v-for="(item,index) in options.plate" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                    </el-select>
                                </el-form-item>
                            </div>
                            <div class="row">
                                <!-- 交易信息  42 -->
                                <div class="column left">
                                    <el-form-item label="交易类型" prop="trading_type">
                                        <el-select v-model="form.trading_type" placeholder="请选择" @change="transactChange" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_jiaoyi) == -1">
                                            <el-option v-for="(item,index) in options.transaction" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="状态" prop="status">
                                        <el-select v-model="form.status" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_zhuangtai) == -1">
                                            <el-option v-for="(item,index) in options.status" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                            
                                    <el-form-item label="售价" prop="price" class="small_inp">
                                        <el-input type="number" v-model="form.price" :readonly="transaction === 2 ? true:false" @blur="sprice_blur" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_jiage) == -1"></el-input>万元
                                    </el-form-item>
                                    <el-form-item label="" prop="unit_price" class="small_inp">
                                        <el-input type="number" v-model="form.unit_price" style="vertical-align: top;" :readonly="transaction === 2 ? true:false" @blur="unit_blur" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_jiage) == -1"></el-input>/m<sup>2</sup>
                                    </el-form-item>
                                    <el-form-item label="售(底价)" prop="sale_floor_price" class="small_inp">
                                        <el-input type="number" v-model="form.sale_floor_price" :readonly="transaction === 2 ? true:false" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_dijiage) == -1"></el-input>
                                    </el-form-item>
                                    <el-form-item label="租价" prop="rents" class="small_inp">
                                        <el-input type="number" v-model="form.rents" :readonly="transaction === 1 ? true:false" @blur="rents_blur"></el-input>
                                    </el-form-item>
                                    <el-form-item label="" prop="rents_type">
                                        <el-select v-model="form.rents_type" placeholder="请选择" :disabled="transaction === 1 ? true:false">
                                            <el-option v-for="(item,index) in options.rentunit" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="" prop="rents_unit_price" class="small_inp">
                                        <el-input type="number" v-model="form.rents_unit_price" style="vertical-align: top;" :readonly="transaction === 1 ? true:false" @blur="rents_unit_blur"></el-input>/m<sup>2</sup>
                                    </el-form-item>
                                    <el-form-item label="租(底价)" prop="floor_price" class="small_inp">
                                        <el-input type="number" v-model="form.floor_price" :readonly="transaction === 1 ? true:false"></el-input>
                                    </el-form-item>
                                    <el-form-item label="包税费" prop="taxes_fees" class="mini_inp">
                                        <el-select v-model="form.taxes_fees" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.package" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="原购价" prop="some_price" class="mini_inp" v-if="typeOne === 1">
                                        <el-input v-model="form.r_info.some_price"></el-input>
                                    </el-form-item>

                                    <el-form-item label="转让费" prop="some_price" class="mini_inp" v-if="typeOne === 2">
                                        <el-input v-model="form.r_info.some_price"></el-input>
                                    </el-form-item>

                                    <el-form-item label="空调费" prop="some_price" class="mini_inp" v-if="typeOne === 3">
                                        <el-input v-model="form.r_info.some_price"></el-input>
                                    </el-form-item>

                                    <el-form-item label="电功率" prop="some_price" class="mini_inp" v-if="typeOne === 4 || typeOne === 5">
                                        <el-input v-model="form.r_info.some_price"></el-input>
                                    </el-form-item>

                                    <el-form-item label="停车费" prop="some_price" class="mini_inp" v-if="typeOne === 6 || typeOne === 7">
                                        <el-input v-model="form.r_info.some_price"></el-input>
                                    </el-form-item>

                                    <el-form-item label="委托方式" prop="entrust_way">
                                        <el-select v-model="form.entrust_way" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_weituofangshi) == -1">
                                            <el-option v-for="(item,index) in options.delegation" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="委托时间" prop="r_entrust_at">
                                        <el-date-picker type="date" placeholder="请选择" v-model="form.r_entrust_at" value-format="yyyy-MM-dd" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_weituoshijian) == -1"></el-date-picker>
                                    </el-form-item>

                                    <el-form-item label="管理费" prop="admin_cost" class="mini_inp">
                                        <el-input v-model="form.admin_cost"></el-input>
                                    </el-form-item>

                                    <el-form-item label="交房" prop="making_room">
                                        <el-date-picker type="date" placeholder="请选择" v-model="form.making_room" value-format="yyyy-MM-dd"></el-date-picker>
                                    </el-form-item>

                                    <el-form-item label="委托编号" prop="entrust_number">
                                        <el-input v-model="form.entrust_number" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_weituobianhao) == -1"></el-input>
                                    </el-form-item>

                                    <el-form-item label="来源" prop="source_type">
                                        <el-select v-model="form.source_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_laiyuan) == -1">
                                            <el-option v-for="(item,index) in options.source" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                </div>
                                <!-- 当前信息  62 -->
                                <div class="column right">
                                    <el-form-item label="现状" prop="status_quo" v-if="typeOne === 1">
                                        <el-select v-model="form.status_quo" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.zsq_statusquo" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="现状" prop="status_quo" v-if="typeOne === 2">
                                        <el-select v-model="form.status_quo" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.spw_statusquo" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="现状" prop="status_quo" v-if="typeOne === 3">
                                        <el-select v-model="form.status_quo" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.xx_statusquo" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="现状" prop="status_quo" v-if="typeOne === 4 || typeOne === 5 || typeOne === 6">
                                        <el-select v-model="form.status_quo" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.ccd_statusquo" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="现状" prop="status_quo" v-if="typeOne === 7">
                                        <el-select v-model="form.status_quo" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.c_statusquo" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="装修" prop="decoration" v-if="typeOne === 1">
                                        <el-select v-model="form.decoration" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.zsq_decoration" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="装修" prop="decoration" v-if="typeOne === 2">
                                        <el-select v-model="form.decoration" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.spw_decoration" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="装修" prop="decoration" v-if="typeOne === 3">
                                        <el-select v-model="form.decoration" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.xx_decoration" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="围墙" prop="fence_type" v-if="typeOne === 4 || typeOne === 5 || typeOne === 6">
                                        <el-select v-model="form.r_info.fence_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.ccd_fencethree" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="围墙" prop="fence_type" v-if="typeOne === 7">
                                        <el-select v-model="form.r_info.fence_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.c_fencethree" :key="index" :label="item.st_name" :value="item.st_name"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="配套" prop="support" v-if="typeOne === 1">
                                        <el-select v-model="form.support" multiple placeholder="请选择">
                                            <el-option v-for="(item,index) in options.zsq_matching" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="配套" prop="support" v-if="typeOne === 3">
                                        <el-select v-model="form.support" multiple placeholder="请选择">
                                            <el-option v-for="(item,index) in options.xx_matching" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="配套" prop="support" v-if="typeOne === 4 || typeOne === 5 || typeOne === 6">
                                        <el-select v-model="form.support" multiple placeholder="请选择">
                                            <el-option v-for="(item,index) in options.ccd_matching" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="配套" prop="support" v-if="typeOne === 7">
                                        <el-select v-model="form.support" multiple placeholder="请选择">
                                            <el-option v-for="(item,index) in options.c_matching" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="行业" prop="industry_type" v-if="typeOne === 2">
                                        <el-select v-model="form.industry_type" multiple placeholder="请选择">
                                            <el-option v-for="(item,index) in options.spw_industryone" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="厕所" prop="wc_type" v-if="typeOne === 2">
                                        <el-select v-model="form.wc_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.zsq_wc" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="厕所" prop="wc_type" v-if="typeOne === 3">
                                        <el-select v-model="form.wc_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.xx_wc" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="空调" prop="air_type" v-if="typeOne === 3">
                                        <el-select v-model="form.air_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.xx_airtwo" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="地段" prop="lot_type" v-if="typeOne === 2">
                                        <el-select v-model="form.lot_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.zsq_lotone" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="家具" prop="furniture" v-if="typeOne === 1">
                                        <el-select v-model="form.furniture" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.zsq_furniture" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="家电" prop="appliance" v-if="typeOne === 1">
                                        <el-select v-model="form.appliance" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.zsq_homeappliance" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="宿舍" prop="dorm_type" v-if="typeOne === 4 || typeOne === 5 || typeOne === 6 ">
                                        <el-select v-model="form.dorm_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.ccd_dormroomthree" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="宿舍" prop="dorm_type" v-if="typeOne === 7">
                                        <el-select v-model="form.dorm_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.c_dormroomthree" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="食堂" prop="canteen_type" v-if="typeOne === 4 || typeOne === 5 || typeOne === 6">
                                        <el-select v-model="form.canteen_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.ccd_canteenthree" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="食堂" prop="canteen_type" v-if="typeOne === 7">
                                        <el-select v-model="form.canteen_type" placeholder="请选择">
                                            <el-option v-for="(item,index) in options.c_canteenthree" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="产权" prop="rights_type" v-if="typeOne === 1">
                                        <el-select v-model="form.rights_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_chanquanleixing) == -1">
                                            <el-option v-for="(item,index) in options.zsq_property" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="产权" prop="rights_type" v-if="typeOne === 2">
                                        <el-select v-model="form.rights_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_chanquanleixing) == -1">
                                            <el-option v-for="(item,index) in options.spw_property" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="产权" prop="rights_type" v-if="typeOne === 3">
                                        <el-select v-model="form.rights_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_chanquanleixing) == -1">
                                            <el-option v-for="(item,index) in options.xx_property" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="产权" prop="rights_type" v-if="typeOne === 4 || typeOne === 5 || typeOne === 6">
                                        <el-select v-model="form.rights_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_chanquanleixing) == -1">
                                            <el-option v-for="(item,index) in options.ccd_property" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="产权" prop="rights_type" v-if="typeOne === 7">
                                        <el-select v-model="form.rights_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_chanquanleixing) == -1">
                                            <el-option v-for="(item,index) in options.c_property" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="证件" prop="certificate_type" v-if="typeOne === 1">
                                        <el-select v-model="form.certificate_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_zhengjianleixing) == -1">
                                            <el-option v-for="(item,index) in options.zsq_document" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="证件" prop="certificate_type" v-if="typeOne === 2">
                                        <el-select v-model="form.certificate_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_zhengjianleixing) == -1">
                                            <el-option v-for="(item,index) in options.spw_document" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="证件" prop="certificate_type" v-if="typeOne === 3">
                                        <el-select v-model="form.certificate_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_zhengjianleixing) == -1">
                                            <el-option v-for="(item,index) in options.xx_document" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="证件" prop="certificate_type" v-if="typeOne === 4 || typeOne === 5 || typeOne === 6">
                                        <el-select v-model="form.certificate_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_zhengjianleixing) == -1">
                                            <el-option v-for="(item,index) in options.ccd_document" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="证件" prop="certificate_type" v-if="typeOne === 7">
                                        <el-select v-model="form.certificate_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_zhengjianleixing) == -1">
                                            <el-option v-for="(item,index) in options.c_document" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="付款" prop="payment_type">
                                        <el-select v-model="form.payment_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fukuanleixing) == -1">
                                            <el-option v-for="(item,index) in options.payment" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="付拥" prop="pay_on_type">
                                        <el-select v-model="form.pay_on_type" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fuyongleixing) == -1">
                                            <el-option v-for="(item,index) in options.commission" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>

                                    <el-form-item label="看房" prop="checking_way">
                                        <el-select v-model="form.checking_way" placeholder="请选择" :disabled="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_kanfangleixing) == -1">
                                            <el-option v-for="(item,index) in options.lookhouse" :key="index" :label="item.st_name" :value="item.st_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="看房备注" prop="checking_remark">
                                        <el-input type="textarea" v-model="form.checking_remark"></el-input>
                                    </el-form-item>
                                </div>
                            </div>
                            <div class="row">
                                <el-form-item label="业主" prop="owner_name">
                                    <el-input :type="lookPrivate" v-model="form.owner_name" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_yezhuxingming) == -1"></el-input>
                                </el-form-item>

                                <el-form-item label="业主手机号" prop="owner_phone">
                                    <el-input :type="lookPrivate" v-model="form.owner_phone" @blur="repeat_telphone" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_yezhudianhua) == -1"></el-input>
                                </el-form-item>

                                <el-form-item label="联系人" prop="contact_name">
                                    <el-input :type="lookPrivate" v-model="form.contact_name"></el-input>
                                </el-form-item>

                                <el-form-item label="联系人手机号" prop="contact_phone">
                                    <el-input :type="lookPrivate" v-model="form.contact_phone"></el-input>
                                </el-form-item>

                                <el-form-item label="备注" prop="remark">
                                    <el-input type="textarea" v-model="form.remark" placeholder="请输入需要补充的内容" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_beizhu) == -1"></el-input>
                                </el-form-item>
                                <div> 
                                    <el-form-item label="员工" prop="r_d_id">
                                        <el-select v-model="form.r_d_id" placeholder="请选择部门" @change="obtainUsers">
                                            <!-- <el-option v-for="(item,index) in optionName" :key="index" :label="item.name" :value="item.id"></el-option> -->
                                            <el-option-group v-for="group in optionName" :key="group.label" :label="group.label">
                                                <el-option v-for="item in group.options" :key="item.value" :label="item.label" :value="item.value">
                                                </el-option>
                                            </el-option-group>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="" prop="source_uid">
                                        <el-select v-model="form.source_uid" placeholder="请选择员工">
                                            <el-option v-for="(item,index) in userTypes" :key="index" :label="item.u_username" :value="item.u_id"></el-option>
                                        </el-select>
                                    </el-form-item>
                                </div>
                            </div>
                    </el-tab-pane>
                    <!-- 明细 -->
                    <el-tab-pane :label="detailTit" v-if="detailNone">
                        <!-- 住宅、商住、其他 -->
                            <el-form-item label="产证号" prop="certificate_production" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.certificate_production" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="产权年限" prop="years_property" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.years_property" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="产权权属" prop="ownership_property " v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.ownership_property" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="共有人" prop="co_owner" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.co_owner" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="税费情况" prop="fee_situation" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.fee_situation" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="抵押史" prop="history_mortgage" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.history_mortgage" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="其他产权信息" prop="other_property_info" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.other_property_info" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="水表底数" prop="water_meter_num" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.water_meter_num" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="电表底数" prop="electric_meter_num" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.electric_meter_num" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="煤气底数" prop="gas_base_num" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.gas_base_num" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="电视到期" prop="tv_expiry" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.tv_expiry" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="物管到期" prop="wg_expiry" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.wg_expiry" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宽带到期" prop="kd_expiry" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.kd_expiry" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="停车到期" prop="car_expiry" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.car_expiry" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="其他读数信息" prop="other_information" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.other_information" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="门窗情况" prop="door_window_condition" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.door_window_condition" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="墙面情况" prop="metope_condition" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.metope_condition" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="屋顶情况" prop="roof_condition" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.roof_condition" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="地面情况" prop="ground_condition" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.ground_condition" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="家具情况" prop="furniture_condition" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.furniture_condition" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="电器情况" prop="electric_appliance_condition" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.electric_appliance_condition" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="其他验收信息" prop="other_acceptance_information" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.other_acceptance_information" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="客厅尺寸" prop="living_room_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.living_room_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="主卧尺寸" prop="master_bedroom_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.master_bedroom_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="客卧1尺寸" prop="one_living_room_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.one_living_room_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="客卧2尺寸" prop="two_living_room_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.two_living_room_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="客卧3尺寸" prop="three_living_room_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.three_living_room_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="客卧4尺寸" prop="four_living_room_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.four_living_room_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="阳台尺寸" prop="balcony_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.balcony_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="厨房尺寸" prop="kitchen_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.kitchen_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="餐厅尺寸" prop="restaurant_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.restaurant_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="卫生间尺寸" prop="toilet_size" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.toilet_size" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="其他物业信息" prop="other_property_information" v-if="typeOne === 1">
                                <el-input v-model="form.r_detaile_list.other_property_information" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>

                        

                        <!-- 写字楼、写厂  33 -->
                            <el-form-item label="第1隔间门牌" prop="one_partition_door" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.one_partition_door" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第1隔间面积" prop="one_compartment_area" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.one_compartment_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第1隔间客户" prop="one_cubicle_customer" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.one_cubicle_customer" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第1隔间租价" prop="one_compartment_lease_price" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.one_compartment_lease_price" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第2隔间门牌" prop="two_partition_door" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.two_partition_door" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第2隔间面积" prop="two_compartment_area" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.two_compartment_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第2隔间客户" prop="two_cubicle_customer" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.two_cubicle_customer" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第2隔间租价" prop="two_compartment_lease_price" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.two_compartment_lease_price" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第3隔间门牌" prop="three_partition_door" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.three_partition_door" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第3隔间面积" prop="three_compartment_area" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.three_compartment_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第3隔间客户" prop="three_cubicle_customer" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.three_cubicle_customer" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第3隔间租价" prop="three_compartment_lease_price" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.three_compartment_lease_price" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第4隔间门牌" prop="four_partition_door" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.four_partition_door" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第4隔间面积" prop="four_compartment_area" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.four_compartment_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第4隔间客户" prop="four_cubicle_customer" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.four_cubicle_customer" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第4隔间租价" prop="four_compartment_lease_price" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.four_compartment_lease_price" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第5隔间门牌" prop="five_partition_door" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.five_partition_door" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第5隔间面积" prop="five_compartment_area" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.five_compartment_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第5隔间客户" prop="five_cubicle_customer" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.five_cubicle_customer" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第5隔间租价" prop="five_compartment_lease_price" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.five_compartment_lease_price" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第6隔间门牌" prop="six_partition_door" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.six_partition_door" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第6隔间面积" prop="six_compartment_area" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.six_compartment_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第6隔间客户" prop="six_cubicle_customer" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.six_cubicle_customer" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="第6隔间租价" prop="six_compartment_lease_price" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.six_compartment_lease_price" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                        <!-- 厂房 57-->

                            <el-form-item label="厂房栋数" prop="num_factory_buildings" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.num_factory_buildings" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="厂房层数" prop="factory_floor_num" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.factory_floor_num" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="厂房每栋面积" prop="plant_area" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.plant_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="厂房每层面积" prop="plant_floor_area" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.plant_floor_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="厂房首层高度" prop="first_floor_height_workshop" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.first_floor_height_workshop" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="厂房二层高度" prop="plant_height_two_stories" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.plant_height_two_stories" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="柱网跨度" prop="spans_column_net" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.spans_column_net" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="航吊高度" prop="hanger_height" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.hanger_height" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="入口高度" prop="entrance_height" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.entrance_height" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="承载重量" prop="bearing_weight" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.bearing_weight" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="新旧程度" prop="new_old_degree" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.new_old_degree" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="空余场地" prop="spare_space" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.spare_space" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宿舍栋数" prop="dorm_number" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.dorm_number" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宿舍层数" prop="dorm_floor_number" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.dorm_floor_number" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宿舍每栋面积" prop="each_area_dormitory" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.each_area_dormitory" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宿舍每层面积" prop="dormitory_floor_area" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.dormitory_floor_area" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宿舍每栋间数" prop="number_dormitories_per_room" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.number_dormitories_per_room" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宿舍每层间数" prop="number_dormitories_per_floor" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.number_dormitories_per_floor" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宿舍每间住人" prop="dormitory_residents" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.dormitory_residents" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="变压器电量" prop="transformer_power" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.transformer_power" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="配电箱" prop="power_distribution_box" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.power_distribution_box" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="电梯" prop="elevator" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.elevator" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="食堂" prop="canteen" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.canteen" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="消防" prop="fire_control" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.fire_control" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="围墙" prop="enclosing_wall_detail" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.enclosing_wall_detail" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="距高速" prop="distance_from_high_speed" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.distance_from_high_speed" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="距机场" prop="distance_from_airport" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.distance_from_airport" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="距码头" prop="wharf" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.wharf" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="厂房租金" prop="workshop_rent" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.workshop_rent" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宿舍租金" prop="dormitory_rent" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.dormitory_rent" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="电梯费" prop="elevator_fee" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.elevator_fee" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="治安费" prop="public_security_fee" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.public_security_fee" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="厂长费" prop="factory_director_fee" v-if="typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.factory_director_fee" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <!-- 商铺、网点、铺厂 90 -->
                            <el-form-item label="管理费" prop="management_expense" v-if="typeOne === 2 || typeOne === 3 || typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.management_expense" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="空调费" prop="air_conditioning_fee_detail" v-if="typeOne === 3">
                                <el-input v-model="form.r_detaile_list.air_conditioning_fee_detail" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="水费" prop="charge_water" v-if="typeOne === 2 || typeOne === 3 || typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.charge_water" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="电费" prop="electricity_fees" v-if="typeOne === 2 || typeOne === 3 || typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.electricity_fees" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="卫生费" prop="public_sanitation_fee" v-if="typeOne === 2 || typeOne === 3 || typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.public_sanitation_fee" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宽带费" prop="broadband_fee" v-if="typeOne === 2 || typeOne === 3">
                                <el-input v-model="form.r_detaile_list.broadband_fee" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="停车费" prop="parking_rate_detail" v-if="typeOne === 2 || typeOne === 3">
                                <el-input v-model="form.r_detaile_list.parking_rate_detail" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="装修期限" prop="time_limit_decoration" v-if="typeOne === 2 || typeOne === 3 || typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.time_limit_decoration" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="押付方式" prop="way_payment" v-if="typeOne === 2 || typeOne === 3 || typeOne === 4 || typeOne === 5">
                                <el-input v-model="form.r_detaile_list.way_payment" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                        <!-- 地皮 -->
                            <el-form-item label="批地年代" prop="land_age" v-if="typeOne === 6">
                                <el-input v-model="form.r_detaile_list.land_age" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                            <el-form-item label="宗地号" prop="parcel_number" v-if="typeOne === 6">
                                <el-input v-model="form.r_detaile_list.parcel_number" :readonly="JtransformStr(permissionFieldArr) == '{}' ? false : ownerPermissionArr.indexOf(permissionFieldArr.qx_room_fangyuanmingxi) == -1"></el-input>
                            </el-form-item>
                        
                    </el-tab-pane>  
                </el-tabs>
            </el-form>
            <div slot="footer" class="dialog-footer" style="text-align:center;padding-bottom: 20px;">
                <el-button @click="cancel('form')" size="mini" v-if="backlist == 0">返回列表</el-button>
                <el-button type="primary" @click="submit('form')" size="mini" :disabled="!preservation">保 存</el-button>
                <el-button type="primary" @click="followup" size="mini" v-show="followstatus">添加房源跟进</el-button>
                <el-button type="primary" @click="picFun" size="mini" v-show="followstatus">查看房源图</el-button>
            </div>
            
        </div>
        <div>
            <!-- 添加跟进 -->
            <div>
                <el-dialog title="房源跟进" :visible.sync="gjdialogFormVisible" width="600px" append-to-body>
                    <!--     classdata：1为添加跟进，2为修改跟进   resourcesdata: 1为房源，2为客源   permissionFollowVal （公客）看客户不必写跟进 权限 0为要写，1为不用写  -->
                    <Editfollow :followsearch="{}" :parentid="r_id" :resourcesdata="1" :classdata="classdata" @followevent="followievent" @addfollowP="addfollowPer" :permissionFollow="permissionFollowVal" />
                </el-dialog>
            </div>
            <!-- 业绩分配 -->
            <div>
                <el-dialog title="业绩分配" :visible.sync="achievementVisible" width="600px">
                    <el-form :model="achievementform" ref="achievementform" inline size="mini" :rules="achievementrules">
                        <el-form-item label="客源">
                            <el-input placeholder="请选择" :value="choose_info_str" class="normal_inp" style="width:384px;" readonly>
                                <el-button slot="append" @click="choose_customer">选择</el-button>
                            </el-input>
                        </el-form-item>
                        <el-form-item label="类型" prop="a_type" class="normal_inp">
                            <el-select v-model="achievementform.a_type" placeholder="请选择" @change="atypechange">
                                <el-option label="单人完成" value="1"></el-option>
                                <el-option label="多人完成" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="业绩总提成" prop="a_money">
                            <el-input type="number" v-model="achievementform.a_money" class="normal_inp"></el-input>
                        </el-form-item>
                        <div v-for="(list,index) in achievement_userlist" :key="index">
                            <el-form-item label="部门" prop="department_id">
                                <el-select v-model="list.department_id" placeholder="请选择" @change="obtainuser">
                                    <!-- <el-option v-for="(item,index) in optionName" :key="index" :label="item.name" :value="item.id"></el-option> -->
                                    <el-option-group v-for="group in optionName" :key="group.label" :label="group.label">
                                        <el-option v-for="item in group.options" :key="item.value" :label="item.label" :value="item.value">
                                        </el-option>
                                    </el-option-group>
                                </el-select>
                            </el-form-item>
                            <el-form-item label="员工" prop="user_id">
                                <el-select v-model="list.user_id" placeholder="请选择">
                                    <el-option v-for="(item,index) in usertypes" :key="index" :label="item.u_username" :value="item.u_id"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="分配比例" prop="percent">
                                <el-input type="number" max="100" v-model="list.percent" class="mini_inp"></el-input>%
                            </el-form-item>
                            <el-button type="danger" icon="el-icon-delete" circle @click="del_user(index)" size="mini" v-show="achievement_userlist.length != 1"></el-button>
                        </div>
                        
                        <el-button @click="add_user" type="primary" icon="el-icon-circle-plus-outline" size="mini" style="margin: 0px 0px 10px 36px;" v-if="achievementaddbtn">添加部门员工</el-button>
                        <div>
                            <el-form-item label="备注" prop="a_remark">
                                <el-input type="textarea" v-model="achievementform.a_remark" class="normal_inp"></el-input>
                            </el-form-item>
                        </div>
                        
                    </el-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button @click="achievementcancel('achievementform')" size="mini">取 消</el-button>
                        <el-button type="primary" @click="achievementsubmit('achievementform')" size="mini">保 存</el-button>
                    </div>
                </el-dialog>
            </div>
            <!-- 添加跟进  选择客源 -->
            <el-dialog title="选择客源" :visible.sync="choosekydialogTableVisible" append-to-body>
                <!-- typedata: 1为房源，2为客源-->
                <Chooselist :typedata="1" @choose_info_strs="chooseievent" />
            </el-dialog>

            <!-- 重复房源   警告 -->
            <el-dialog title="警告" :visible.sync="repeatdialogVisible" width="30%">
                <p>发现重复的房源记录！</p>
                <p>编号：<span style="color:brown;">[{{property_number}}]</span>楼盘字典、栋座、位置、房号完全相同。</p>
                <p>是否打开<span style="color:brown;">[{{property_number}}]</span>房源？</p>
                <span slot="footer" class="dialog-footer">
                    <el-button @click="repeatcancel" size="mini">取 消</el-button>
                    <el-button type="primary" @click="repeatsubmit" size="mini">确 定</el-button>
                </span>
            </el-dialog>
            <!-- 委托时间   警告 -->
            <el-dialog title="警告" :visible.sync="entrustdialogVisible" width="30%">
                <p>房源改为【有效】状态可自动修改【委托日期】为今天。是否确定要修改？</p>
                <span slot="footer" class="dialog-footer">
                    <el-button @click="entrustcancel" size="mini">取 消</el-button>
                    <el-button type="primary" @click="entrustsubmit" size="mini">确 定</el-button>
                </span>
            </el-dialog>
            <!-- 重复手机号   警告 -->
            <el-dialog title="警告" :visible.sync="telphonedialogVisible" width="30%">
                <p>发现重复的房源记录！</p>
                <p>编号：<span style="color:brown;">[{{repeat_number}}]</span>含有相同【电话号码】！</p>
                <span slot="footer" class="dialog-footer">
                    <el-button type="primary" @click="telphonesubmit" size="mini">确 定</el-button>
                </span>
            </el-dialog>
            <!-- 添加楼盘字典 -->
            <el-dialog title="添加楼盘字典" :visible.sync="lpzdcenterDialogVisible" v-if="lpzdcenterDialogVisible" width="60%" center>
                <!--传参：  tjstatus 页面状态（1为新增  2为修改） editcont修改楼盘字典时的数据        事件：  listdata刷新列表   dialogstatus关闭弹窗 -->
                <Editbuildingdictionary :tjstatus = "1" :editcont = "editcont" @dialogstatus="dialogstatus"/>
            </el-dialog>
            <!-- 房源图列表 -->
            <el-dialog title="房源图" :visible.sync="piclistdialogVisible" width="970px" center append-to-body>
                <el-button @click="addpic('form')" type="primary" size="mini" style="margin-bottom: 20px;" :disabled="addpicPermission">添加房源图</el-button>
                <el-button @click="delpic" type="primary" size="mini" :disabled="!nowPic || delpicPermission" style="margin-bottom: 20px;">批量删除房源图</el-button>
                <div style="height: 640px;" v-if="nowPic != ''">
                    <div class="listpic" style="display:inline-block;width: 190px;height: 640px;overflow-y:auto;">

                        <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
                        <div style="margin: 15px 0;"></div>
                        <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
                            <el-checkbox v-for="(item,index) in cities" :key="index" :label="item.riu_id" @click.native="storageDetail(index)" @keyup.up.native="carouselKeyProess(-1)" @keyup.down.native="carouselKeyProess(1)" @keyup.left.native="carouselKeyProess(-1)" @keyup.right.native="carouselKeyProess(1)">
                                <img :src="item.rid_url" style="display: block;width: 146px;height: 146px;margin:0px auto;border: 1px solid #c0ccda;border-radius: 6px;" />
                            </el-checkbox>
                        </el-checkbox-group>

                    </div>
                    <div style="display:inline-block;width: 726px;height: 640px;">
                        <div style="height: 610px;">
                            <!-- 幻灯片 -->
                            <el-carousel ref="carousel" indicator-position="none" :autoplay="false"  arrow="always" height="610px" @change="carouselChange" @keyup.up.native="carouselKeyProess(-1)" @keyup.down.native="carouselKeyProess(1)" @keyup.left.native="carouselKeyProess(-1)" @keyup.right.native="carouselKeyProess(1)">
                                <el-carousel-item v-for="item in cities" :key="item.riu_id" name="index">
                                    <img :src="item.rid_url" style="display: block;max-width: 100%;max-height: 100%;margin:0px auto;" @dblclick="dbllookpic" />
                                </el-carousel-item>
                            </el-carousel>
                            
                        </div>
                        <div style="text-align:center;">   
                            <span slot="tip" class="el-upload__tip" style="height: 22px;text-align: center;margin-right:25px;">{{nowPictip}}</span>
                            <a :href="nowPic" :download="nowPic"><el-button type="primary" size="mini">导出图片</el-button></a>
                        </div>
                        
                    </div>
                </div>
                
            </el-dialog>
            <!-- 放大查看房源图 -->
            <el-dialog title="" :visible.sync="dbllookpicdialogvisible" center style="max-width: calc(100% - 30px);max-height: calc(100% - 30px);">
                <img :src="nowPic" style="display: block;margin:0px auto;width:100%;" />
            </el-dialog>   
            <!-- 添加房源图 -->
            <el-dialog title="添加" :visible.sync="picdialogVisible" width="60%" center>
                <el-form :model="picform" ref="picform" size="mini">
                    
                    <el-form-item label="图片" :rules="[{ required: true, message: '请上传图片'}]">
                        <!-- <el-upload list-type="picture-card" :action="upload()" multiple auto-upload="false" :before-upload="beforeAvatarUpload" :on-success="successAvatarUpload" :on-preview="handlePictureCardPreview" :on-remove="handleRemove"> -->
                        <el-upload list-type="picture-card" ref="upload" :action="upload()" multiple :limit="15" :http-request="uploadSectionFile" :on-change="changeuploadFile" :before-upload="beforeAvatarUpload" :on-preview="handlePictureCardPreview">
                            <i class="el-icon-plus"></i>
                        </el-upload>
                        <el-dialog :visible.sync="detailspicdialogVisible" append-to-body>
                            <img width="100%" :src="picdialogImageUrl" alt="">
                        </el-dialog>
                    </el-form-item>
                    <el-form-item label="是否添加水印" prop="wate">
                        <el-select v-model="picform.wate" placeholder="请选择" class="normal_inp">
                            <el-option label="是" value="1"></el-option>
                            <el-option label="否" value="0"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="水印位置" prop="position">
                        <el-select v-model="picform.position" placeholder="请选择" class="normal_inp">
                            <el-option label="左上" value="1"></el-option>
                            <el-option label="右上" value="2"></el-option>
                            <el-option label="左下" value="3"></el-option>
                            <el-option label="右下" value="4"></el-option>
                            <el-option label="中间" value="5"></el-option>
                        </el-select>
                    </el-form-item>
                    <span>
                        <el-button type="primary" @click="submitpic('picform')" size="mini">添 加</el-button>
                        <el-button type="primary" @click="cancelpic('picform')" size="mini">取 消</el-button>
                    </span>
                </el-form>
                
            </el-dialog>   
        </div>
    </div>
</template>
<style>
    .listpic .el-upload--picture-card{
        display: none;
    }
    .el-checkbox+.el-checkbox{
        margin-left: 0px;
    }
    .bigpic{
        transform: scale(1.5);
    }
</style>

<script>

    import conf from '../../../../config/userconf.js'
    import permconfig from "../../../../config/permconfig.js"
    export default {
        name: "Editroom",
        props: {
            backlist: {   //   backlist 判断是否有返回列表按钮，0为有，1为无
                type: String,
                required: true,
            },
            maininfo: {   //   maininfo判断是否返回有底部房源主要信息  0为无 1为有
                type: String,
                required: true,
            }        
        },
        data () {
            var validatePhone = (rule,value,callback) => {    //正则手机号

                var MobileRegex = /^1[3|4|5|7|8][0-9]{9}$/;
                if (!MobileRegex.test(value)) {
                    callback(new Error('手机号格式不正确！'))
                } else {
                    callback();
                }
            };
            var isCardNo = (rule,value,callback) => {    //正则身份证
                                    
                var MobileRegex = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
                // var MobileRegex = /(^\d{14}[[0-9],0-9xX]$)|(^\d{17}[[0-9],0-9xX]$)/;
                if (!MobileRegex.test(value)) {
                    callback(new Error('身份证格式不正确！'))
                } else {
                    callback();
                }
            };
            return {
                form: {
                    // a_id:'',
                    building_id:'',  //楼盘字典id
                    few_building:'',  //几号楼  栋座
                    position: '',  //位置
                    room_number:'',  //房号
                    floor:'',  //楼层
                    total_layer:'',  //总层
                    use_type: 3,  //用途id
                    housing_types:'',  //房屋类型 10
                    type_of_house_sale:'',  //房屋出售类型
                    building_s:'',  //建房年代
                    disc_type:'',  //盘类型
                    trading_type: 93,  //交易类型
                    status: 97,  //交易状态类型
                    price:'0.00',  //售价
                    unit_price:'0',  //售价 每平米多钱
                    sale_floor_price:'0.0',  //售 底价
                    floor_price:'0.0',  //租 底价
                    rents_unit_price:'0.00',  //租价的每平米价格 20
                    taxes_fees:'',  //包税费
                    rents:'0.0',  //租金
                    rents_type: 705,  //租价类型   705 元/月
                    entrust_way:'',  //委托方式
                    admin_cost:'0.00',  //管理费
                    making_room:'',  //交房时间
                    entrust_number:'',  //委托编号
                    r_entrust_at: '',  //委托时间
                    source_type:'',  //来源id
                    status_quo:'',  //现状
                    decoration:'',  //装修 30
                    support:[],  //配套
                    furniture:'',  //家具
                    appliance:'',  //家电
                    rights_type:'',  //产权类型
                    certificate_type:'',  //证件类型
                    payment_type:'',  //付款类型
                    pay_on_type:'',  //付拥类型
                    fence_type: '',  // 围墙
                    industry_type: [],  //行业
                    wc_type: '',  // 厕所
                    dorm_type: '',  //宿舍
                    lot_type: '',  // 地段
                    air_type: '',  // 空调
                    canteen_type: '',  // 食堂
                    checking_way:'',  //看房方式
                    checking_remark:'',  //看房方式备注
                    owner_name:'',  //业主姓名 40
                    owner_phone:'',  //业主电话
                    contact_name:'',  //联系人姓名
                    contact_phone:'',  //联系人电话
                    remark:'',  //备注
                    r_acreage: '0.00',  //房屋面积
                    some_price: '0.0',  //原购价 转让费  空调费  停车费  电功率
                    r_info: {
                        room_s: '',  //室
                        office_s: '',  //厅
                        guard_s: '',  //卫
                        balcony_s: '',  //阳台
                        depth_s: '',  //进深
                        plan_s: '',  //规划
                        length_s: '',  //长度
                        width_s: '',  //宽度
                        level_s: '',  //级别
                        real_rate: '',  //实率
                        layer_height: '',  //层高
                        workshop_s: '',  //厂房
                        warehouse_s: '',  //仓库
                        dormitory_s: '',  //宿舍 60
                        unit_length: '',  //长
                        unit_width: '',  //宽
                        unit_height: '',  //高
                        inside: '0.00',  //套内
                        gate_width: '',  //门宽
                        work_office: '',  //办公
                        vacant_land: '',  //空地
                        unit_total: '',  //总计
                        number_layers: '',  //层数 70
                        orientation: '',  //朝向
                        current_situation: '',  //状况
                        monthly_package: '',  //包月
                        displacement: '',  //排量
                    },
                    r_detaile_list: {  //房源明细列表
                        certificate_production: '',  //产证号
                        years_property: '',  //产权年限
                        ownership_property: '',  //产权权属
                        co_owner: '',  //共有人
                        fee_situation: '',  //税费情况
                        history_mortgage: '',  //抵押史
                        other_property_info: '',  //其他产权信息
                        water_meter_num: '',  //水表底数
                        electric_meter_num: '',  //电表底数
                        gas_base_num: '',  //煤气底数  10
                        tv_expiry: '',  //电视到期
                        wg_expiry: '',  //物管到期
                        kd_expiry: '',  //宽带到期
                        car_expiry: '',  //停车到期
                        other_information: '',  //其他读数信息
                        door_window_condition: '',  //门窗情况
                        metope_condition: '',  //墙面情况
                        roof_condition: '',  //屋顶情况
                        ground_condition: '',  //地面情况
                        furniture_condition: '',  //家具情况 20
                        electric_appliance_condition: '',  //电器情况
                        other_acceptance_information: '',  //其他验收信息
                        living_room_size: '',  //客厅尺寸
                        master_bedroom_size: '',  //主卧尺寸
                        one_living_room_size: '',  //客卧1尺寸
                        two_living_room_size: '',  //客卧2尺寸
                        three_living_room_size: '',  //客卧3尺寸
                        four_living_room_size: '',  //客卧4尺寸
                        balcony_size: '',  //阳台尺寸
                        kitchen_size: '',  //厨房尺寸  30
                        restaurant_size: '',  //餐厅尺寸
                        toilet_size: '',  //卫生间尺寸
                        other_property_information: '',  //其他物业信息
                        one_partition_door: '',  //第1隔间门牌
                        one_compartment_area: '',  //第1隔间面积
                        one_cubicle_customer: '',  //第1隔间客户
                        one_compartment_lease_price: '',  //第1隔间租价
                        two_partition_door: '',  //第2隔间门牌
                        two_compartment_area: '',  //第2隔间面积
                        two_cubicle_customer: '',  //第2隔间客户  40
                        two_compartment_lease_price: '',  //第2隔间租价
                        three_partition_door: '',  //第3隔间门牌
                        three_compartment_area: '',  //第3隔间面积
                        three_cubicle_customer: '',  //第3隔间客户
                        three_compartment_lease_price: '',  //第3隔间租价
                        four_partition_door: '',  //第4隔间门牌
                        four_compartment_area: '',  //第4隔间面积
                        four_cubicle_customer: '',  //第4隔间客户
                        four_compartment_lease_price: '',  //第4隔间租价
                        five_partition_door: '',  //第5隔间门牌  50
                        five_compartment_area: '',  //第5隔间面积
                        five_cubicle_customer: '',  //第5隔间客户
                        five_compartment_lease_price: '',  //第5隔间租价
                        six_partition_door: '',  //第6隔间门牌
                        six_compartment_area: '',  //第6隔间面积
                        six_cubicle_customer: '',  //第6隔间客户
                        six_compartment_lease_price: '',  //第6隔间租价
                        num_factory_buildings: '',  //厂房栋数
                        factory_floor_num: '',  //厂房层数
                        plant_area: '',  //厂房每栋面积  60
                        plant_floor_area: '',  //厂房每层面积
                        first_floor_height_workshop: '',  //厂房首层高度
                        plant_height_two_stories: '',  //厂房二层高度
                        spans_column_net: '',  //柱网跨度
                        hanger_height: '',  //航吊高度
                        entrance_height: '',  //入口高度
                        bearing_weight: '',  //承载重量
                        new_old_degree: '',  //新旧程度
                        spare_space: '',  //空余场地
                        dorm_number: '',  //宿舍栋数  70
                        dorm_floor_number: '',  //宿舍层数
                        each_area_dormitory: '',  //宿舍每栋面积
                        dormitory_floor_area: '',  //宿舍每层面积
                        number_dormitories_per_room: '',  //宿舍每栋间数
                        number_dormitories_per_floor: '',  //宿舍每层间数
                        dormitory_residents: '',  //宿舍每间住人
                        transformer_power: '',  //变压器电量
                        power_distribution_box: '',  //配电箱
                        elevator: '',  //电梯
                        canteen: '',  //食堂  80
                        fire_control: '',  //消防
                        enclosing_wall_detail: '',  //围墙
                        distance_from_high_speed: '',  //距高速
                        distance_from_airport: '',  //距机场
                        wharf: '',  //距码头
                        workshop_rent: '',  //厂房租金
                        dormitory_rent: '',  //宿舍租金
                        elevator_fee: '',  //电梯费
                        public_security_fee: '',  //治安费
                        factory_director_fee: '',  //厂长费  90
                        management_expense: '',  //管理费
                        air_conditioning_fee_detail: '',  //空调费
                        charge_water: '',  //水费
                        electricity_fees: '',  //电费
                        public_sanitation_fee: '',  //卫生费
                        broadband_fee: '',  //宽带费
                        parking_rate_detail: '',  //停车费
                        time_limit_decoration: '',  //装修期限
                        way_payment: '',  //押付方式
                        land_age: '',  //批地年代  100
                        parcel_number: '',  //宗地号
                    },
                    source_uid: '',  //用户id
                    r_d_id: '',  //部门id
                    ri_room_type: '',  // 房型（只用于检索条件的使用）
                    ri_numbe_layers: '',  // 层数（只用于检索条件的使用）
                    ri_oriented: '',  // 朝向（只用于检索条件的使用）
                },
                rules:{
                    // a_id: [
                    //     { required: true, message: '请选择区县', trigger: 'change' }
                    // ],
                    building_id: [
                        { required: true, message: '请选择楼盘', trigger: 'change' }
                    ],
                    few_building: [
                        { required: false, message: '请选择栋座', trigger: 'change' }
                    ],
                    position: [
                        { required: false, message: '请选择位置', trigger: 'change' }
                    ],
                    room_number: [
                        { required: true, message: '请输入房号', trigger: 'blur' }
                    ],
                    floor: [
                        { required: true, message: '请输入楼层', trigger: 'blur' }
                    ],
                    total_layer: [
                        { required: true, message: '请输入总层', trigger: 'blur' }
                    ],
                    use_type: [
                        { required: true, message: '请选择用途', trigger: 'change' }
                    ],
                    housing_types: [
                        { required: true, message: '请选择房屋类型', trigger: 'change' }
                    ],
                    type_of_house_sale: [
                        { required: true, message: '请选择房屋出售类型', trigger: 'change' }
                    ],
                    disc_type: [
                        { required: true, message: '请选择盘类型', trigger: 'change' }
                    ],
                    trading_type: [
                        { required: true, message: '请选择交易类型', trigger: 'change' }
                    ],
                    status: [
                        { required: true, message: '请选择交易状态类型', trigger: 'change' }
                    ],
                    price: [
                        { required: false, message: '请输入售价', trigger: 'blur' }
                    ],
                    unit_price: [
                        { required: false, message: '请输入单价/平米', trigger: 'blur' }
                    ],
                    sale_floor_price: [
                        { required: false, message: '请输入售(底价)', trigger: 'blur' }
                    ],
                    floor_price: [
                        { required: false, message: '请输入租(底价)', trigger: 'blur' }
                    ],
                    rents_unit_price: [
                        { required: false, message: '请输入租价/平米', trigger: 'blur' }
                    ],
                    rents: [
                        { required: false, message: '请输入租金', trigger: 'blur' }
                    ],
                    rents_type: [
                        { required: false, message: '请选择租价类型', trigger: 'change' }
                    ],
                    owner_name: [
                        { required: true, message: '请输入业主姓名', trigger: 'blur' }
                    ],
                    owner_phone: [
                        { required: true, message: '请输入业主手机号', trigger: 'blur' },
                        { validator: validatePhone, trigger: 'blur'}
                    ],
                    contact_name: [
                        { required: false, message: '请输入联系人姓名', trigger: 'blur' }
                    ],
                    contact_phone: [
                        { required: false, message: '请输入联系人手机号', trigger: 'blur' },
                        {
                            validator:(rule,value,callback)=>{
                                if(value != "" && value != null){
                                    var MobileRegex = /^1[3|4|5|7|8][0-9]{9}$/;
                                    if (!MobileRegex.test(value)) {
                                        callback(new Error('手机号格式不正确！'))
                                    } else {
                                        callback();
                                    }
                                    
                                }else{
                                    callback();
                                }
                            }, trigger: 'blur'
                        },
                    ],
                    r_d_id: [
                        { required: true, message: '请选择', trigger: 'change' }
                    ],
                    source_uid: [
                        { required: true, message: '请选择', trigger: 'change' }
                    ],
        
                },
                useTypeData: [],    //用途
                typeOne: 1,  //用途更改    所填资料类型
                transaction: 1,// 交易类型  1 出租、2 出售 、3 租售
                detailTit: '住宅明细',
                detailNone: true,  //明细模块 隐藏 显示
                buildingOpt: [],  //楼盘字典的下拉
                fewOpt: [],  //栋座的下拉
                positionOpt: [],  //位置的下拉
                options: '',  //所有下拉数据
                customeroptlist: '',  //客源下拉数据
                optionName: [],
                userTypes: [],
                usertypes: [],
                usertypess: [],
                buildingId: '',  // 楼盘id
                r_id: '',  // 房源id
                property_number: '',  //房源编号
                c_numbering: '',  // 客源编号
                c_user_name: '',  // 客源  客户名称
                preservation: true,   //是否可保存
                followstatus: false,//添加跟进  状态
                gjdialogFormVisible: false,  // 跟进弹框
                followform: {
                    f_user_id: '',
                    f_department_id: '',
                    f_follow_up_way: '',
                    f_content: '',
                    cfs_remind_time: '',
                    cfs_type: 1,   //类型（1房源提醒 2客源提醒）
                    cfs_user_id: '',
                    cfs_content: '',
                    cfs_deal_with: 2,  //	处理结果（1已处理 2未处理）
                    cfs_dealwith_pro: '',
                    cfs_dealwith_time: '',
                    cfs_manager_review: '',
                    f_customers_id: '',
                },
                followrules: {
                    f_user_id: [
                        { required: true, message: '请选择跟进人', trigger: 'change' }
                    ],
                    f_department_id: [
                        { required: true, message: '请选择跟进人所在部门', trigger: 'change' }
                    ],
                    f_follow_up_way: [
                        { required: true, message: '请选择跟进方式', trigger: 'change' }
                    ],
                    f_content: [
                        { required: true, message: '请输入跟进内容', trigger: 'blur' },
                        { min: 6, message: '最少输入6个字符', trigger: 'blur' }
                    ],
                },
                follow_up_way: [   // 房源跟进  跟进方式 下拉选项
                    {value: '去电' , id: '1'},
                    {value: '来电' , id: '2'},
                    {value: '看房' , id: '3'},
                    {value: '勘察' , id: '4'},
                    {value: '来访' , id: '5'},
                    {value: '拜访' , id: '6'},
                    {value: '派单' , id: '7'},
                    {value: '短信' , id: '8'},
                    {value: '邮件' , id: '9'},
                    {value: '信函' , id: '10'},
                    {value: '申请' , id: '11'},
                    {value: '修改' , id: '12'},
                    {value: '保留' , id: '13'},
                    {value: '其他' , id: '14'},
                ],
                cfs_user: [   // 房源跟进  提醒范围  下拉选项
                    {value: '本人' , id: '1'},
                    {value: '本部' , id: '2'},
                ],
                choosekydialogTableVisible: false,   // 客源  弹框
                customerData: [],   // 客源列表
                customerform: {
                    c_secondary_area: '',
                    c_trading_type: '',
                    c_buy_status: '',
                    c_store_id: '',
                    c_employees_id: '',
                    keywords: '',
                },
                remind: false,   //跟进 提醒状态
                tjstatus: 1,  // 页面   1 添加    2 修改
                achievementform: {  // 业绩分配 表单数据
                    a_type: '',
                    a_money: '',
                    percent: '',  //提成比例
                    user_id: '',  //员工id
                    a_remark: '',
                },
                achievementrules: [],  //业绩分配   表单校验
                achievementVisible: false,
                repeatdialogVisible: false,
                repeatData: '',  //重复房源数据
                department_name: '',  //部门name
                staff_name: '',  //员工name
                achievementeditinfo: '',
                achievementData: [],   //业绩分配
                achievementaddbtn: false,  //业绩分配   添加员工信息  btn
                achievement_userlist: [{user_id:'',percent:'',department_id:''}],
                achievementrules: {
                    a_type: [
                        { required: true, message: '请选择类型', trigger: 'change' }
                    ],
                    a_money: [
                        { required: true, message: '请输入业绩提成', trigger: 'blur' }
                    ],
                },
                entrust_time_status: '',  //修改时  委托时间的状态判断 
                entrustdialogVisible: false,
                telphonedialogVisible: false,
                repeat_number: '',  //相同业主手机号
                sale_floor_price_first: 0, //根据售价设置默认底价
                rents_floor_price: 0,//根据租价设置默认底价
                entrust_time_confirm_status: false,  //修改委托时间已操作（不论是否修改）  用来判断是否已知会过用户
                // resourcesdialogVisible: false,  //匹配的客源信息弹框  显示隐藏
                lpzdcenterDialogVisible: false,  // 添加楼盘字典弹框    显示隐藏
                editcont: {},  //楼盘字典  默认参数
                choose_info_str: '',   //房客源跟进 跟进方式为看房时   选择房客源  展示数据
                classdata: 1,  //1为添加跟进，2为修改跟进
                piclistdialogVisible: false,  //房源图列表
                picdialogVisible: false,  //房型图  弹框   显示隐藏
                detailspicdialogVisible: false,  //
                picdialogImageUrl: '',
                fileList: [],   //上传的文件列表
                piclist: [],  //房源图列表数据
                picform: {  //添加房源图  表单
                    files: [],
                    wate: '1',
                    position: '1',
                },
                nowPic: '',  //房源图列表   图片预览
                nowPictip: '',  //图片预览说明文字
                //图片预览   选择
                checkAll: false,
                checkedCities: [],
                cities: [],
                isIndeterminate: true,
                //end
                nowchoosepic: [],  //当前选择的图片
                dbllookpicdialogvisible: false,   //双击放大照片弹框
                nowval: 0,  //幻灯片  当前下标
                ownerPermissionArr: [],  //账号权限数组
                permissionFieldArr: {},  //字段权限对象
                 lookPrivate: 'text',   //查看私盘权限 (限制客户姓名电话等)
                editroomrowdata: '',  //编辑页存储的数据
                editroomrowdatajson: '',  //编辑页存储的数据json
                mineId: '',  //自己的id
                permissionFollowVal: 0,  //看业主不必写跟进   0为要写，1为不要写
                addpicPermission: false,  //添加房源图权限
                delpicPermission: false,  //删除房源图权限
            }
        },
        methods: {
            
            pagetype(sdata=Object()){

                //构造默认员工下拉数据
                // this.userTypes = JSON.parse(window.localStorage.getItem('user_down'));
                // console.log(this.userTypes);
                
                var ownerPermission = window.localStorage.getItem('authories');
                var arr = ownerPermission.split(',');
                
                this.ownerPermissionArr = arr;
                this.editroomrowdata = sessionStorage.getItem("editroomrow");              
                
                this.mineId = window.localStorage.getItem('uid');  //自己的id

                if(this.editroomrowdata){   //编辑页

                    this.editroomrowdatajson = JSON.parse(sessionStorage.getItem("editroomrow"));

                    this.tjstatus = 2; 
                    //字段权限
                    this.permissionFieldArr = permconfig;
                    //初始化  赋值
                    let row = this.editroomrowdatajson;
                    console.log(row);
                    this.form = row;
                        //查看私盘
                    if(row.disc_type != 35){  //不等于公盘
                        if(this.ownerPermissionArr.indexOf(permconfig.qx_room_chakansipan)  == -1 && row.source_uid != window.localStorage.getItem('uid')){
                            this.lookPrivate = 'password';
                            if(this.maininfo == 1){
                                row.roomInfo.secound = "【**】 ***********";
                            }
                            
                        }else{
                            this.lookPrivate = 'text';
                        }
                    }else{
                        if(this.ownerPermissionArr.indexOf(permconfig.qx_room_kanyezhububixiegenjin) == -1 && row.source_uid != window.localStorage.getItem('uid')){
                                 //需要填写一条跟进后才可查看客户信息
                            this.lookPrivate = 'password';
                            var cache = window.localStorage.getItem("ROOM_PUBLIC_GUEST" + row.id);
                            if(!cache){

                                //需要填写跟进，填写完成后存储
                                this.gjdialogFormVisible = true;  //打开跟进弹框，填写跟进
                                this.classdata = 1; //添加跟进
                                this.permissionFollowVal = 0;

                            }else{
                                this.lookPrivate = 'text';
                                if(this.maininfo == 1){
                                    //添加完跟进 看客户权限更改
                                    row.roomInfo.secound = '【' + this.form.owner_name + '】' + this.form.owner_phone; 
                                }
                                  
                            }
                            
                        }
                    }

                    //权限
                    permconfig.qx_room_shangchauntupian(row, (res)=>{  //添加房源图
                        console.log(res);
                        if(!res){
                            this.addpicPermission = true;
                        }
                    })

                    permconfig.qx_room_xiugaitupian(row, (res)=>{  //删除房源图
                        console.log(res);
                        if(!res){
                            this.delpicPermission = true;
                        }
                    })

                    //部门员工列表数据
                    this.obtainUsers(row.r_d_id);
                    
                    // this.buildingId = this.form.building_id;
                    this.form.building_id = this.form.building_name;
                    this.r_id = row.id;

                    this.form.use_type = this.transformInt(row.use_type);
                    this.form.housing_types = this.transformInt(row.housing_types);
                    this.form.type_of_house_sale = this.transformInt(row.type_of_house_sale);
                    this.form.rents_type = this.transformInt(row.rents_type);
                    this.form.entrust_way = this.transformInt(row.entrust_way);
                    this.form.source_type = this.transformInt(row.source_type);
                    this.form.status_quo = this.transformInt(row.status_quo);
                    this.form.decoration = this.transformInt(row.decoration);
                    this.form.furniture = this.transformInt(row.furniture);
                    this.form.appliance = this.transformInt(row.appliance);
                    this.form.rights_type = this.transformInt(row.rights_type);
                    this.form.certificate_type = this.transformInt(row.certificate_type);
                    this.form.payment_type = this.transformInt(row.payment_type);
                    this.form.pay_on_type = this.transformInt(row.pay_on_type);
                    this.form.checking_way = this.transformInt(row.checking_way);
                    this.form.dorm_type = this.transformInt(row.dorm_type);
                    this.form.canteen_type = this.transformInt(row.canteen_type);
                    this.form.air_type = this.transformInt(row.air_type);
                    this.form.wc_type = this.transformInt(row.wc_type);
                    this.form.fence_type = this.transformInt(row.fence_type);
                    this.form.lot_type = this.transformInt(row.lot_type);
                    this.form.taxes_fees = this.transformInt(row.taxes_fees);
                    

                    this.form.source_uid = row.source_uid;

                    if(this.form.use_type){
                        //3 住宅 、4 商住 、14 其他
                        //5 商铺 、6 网点 、10 铺厂 
                        //7 写字楼 、9 写厂
                        //8 厂房
                        //11 仓库
                        //12 地皮 
                        //13 车位
                        switch(this.form.use_type){
                            case 3:
                                this.typeOne = 1;
                                this.detailNone = true;
                                this.detailTit = '住宅明细';
                                break;
                            case 4:
                                this.typeOne = 1;
                                this.detailNone = true;
                                this.detailTit = '商住明细';
                                break;
                            case 5:
                                this.typeOne = 2;
                                this.detailNone = true;
                                this.detailTit = '商铺明细';
                                break;
                            case 6:
                                this.typeOne = 2;
                                this.detailNone = true;
                                this.detailTit = '网点明细';
                                break;
                            case 7:
                                this.typeOne = 3;
                                this.detailNone = true;
                                this.detailTit = '写字楼明细';
                                break;
                            case 8:
                                this.typeOne = 4;
                                this.detailNone = true;
                                this.detailTit = '厂房明细';
                                break;
                            case 9:
                                this.typeOne = 3;
                                this.detailNone = true;
                                this.detailTit = '写厂明细';
                                break;
                            case 10:
                                this.typeOne = 2;
                                this.detailNone = true;
                                this.detailTit = '铺厂明细';
                                break;
                            case 11:
                                this.typeOne = 5;
                                this.detailNone = true;
                                this.detailTit = '仓库明细';
                                break;
                            case 12:
                                this.typeOne = 6;
                                this.detailNone = true;
                                this.detailTit = '地皮明细';
                                break;
                            case 13:
                                this.typeOne = 7;
                                this.detailNone = false;
                                break;
                            case 14:
                                this.typeOne = 1;
                                this.detailNone = false;
                                break;
                        }
                    }
                    if(this.maininfo == 1){
                        //传数据至父组件   底部主要信息
                        this.$emit('maininfoevent',row.roomInfo);
                    }
                    
                    if(this.form.status != 97){   //当状态不是 有效 时，存储该状态
                        this.entrust_time_status = this.form.status;
                    }
                    sdata.id = this.r_id;
                    this.followstatus = true;   //可添加跟进
                    //传数据至父组件   跟进列表
                    this.$emit('followevent',this.r_id);
                    // this.followlist();  //获取房源跟进列表
                    //获取相匹配的客源列表
                    conf.room.customerinfo(sdata,(state,res)=>{
                        if(state == 'success'&&res.data.code == 0){
                            // console.log(res);
                            if(res.data.data.customers_list){
                                //传数据至父组件   业绩分配成功  可匹配的房源信息
                                this.$emit('housingevent',res.data.data.customers_list);//客源信息
                                // this.customer = res.data.data.customers_list;  //客源信息
                            }
                            //房源  底部信息 内容
                            // this.important_information = res.data.data.important_information;
                        }else if (state == 'success'&&res.data.code != 0){
                            if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                        }
                    })
                    //配套  行业   字符串转换为数组
                    this.strarrFun();
                }else{  //添加页

                    //添加 权限
                    if(arr.indexOf(permconfig.qx_room_tianjia)  > -1){
                        this.userTypes = [{
                            "u_id": parseInt(window.localStorage.getItem('uid')),
                            "u_username":window.localStorage.getItem("uname")
                        }]
                        // console.log(this.userTypes);
                    }else{
                        //构造默认员工下拉数据
                        this.userTypes = JSON.parse(window.localStorage.getItem('user_down'));
                        // console.log(this.userTypes);
                    }

                    this.tjstatus = 1;
                    this.form.r_d_id = parseInt(window.localStorage.getItem('did'));
                    this.form.source_uid = parseInt(window.localStorage.getItem('uid'));
                    console.log('-----------添加页-------------',this.editroomrowdata);
                }
                
            },
            //接收子组件editfollow   添加跟进成功   
            followievent(){
                this.gjdialogFormVisible = false;
                //传数据至父组件   添加跟进成功   res为返回的数据
                this.$emit('followevent','');
            },
            addfollowPer(){
                this.lookPrivate = 'text';
                //传值父组件 添加完跟进 看业主权限更改
                let row = this.editroomrowdatajson;
                if(this.maininfo == 1){
                    row.roomInfo.secound = '【' + row.owner_name + '】' + row.owner_phone;
                    // //传数据至父组件   底部主要信息
                    this.$emit('maininfoevent',row.roomInfo);
                }

                
            },
            //接收子组件chooselist
            chooseievent(str,id){
                console.log(str,id);
                this.choose_info_str = str;
                this.c_id = id;
                this.choosekydialogTableVisible = false;
            },
            //字符串转换int数组
            intarrFun(val){
                val = val + ',';
                if(typeof(val) == 'string'){
                    val = val.split(',');//分割成字符串数组
                    var dataIntArrs=[];//保存转换后的整型字符串
                    //字符串数组转为整形字符串  
                    // val.forEach(function(data,index,arr){  
                    //     dataIntArrs.push(+data);  
                    // });
                    for(var i=0; i< val.length-1; i++){
                        dataIntArrs.push(parseInt(val[i]));
                    }
                    return dataIntArrs;
                }
                
            },
            //字符串转换int数组 (提交之后   数据处理)
            strarrFun(){
                //配套  行业
                if(!this.form.support){
                    this.form.support = [];
                }else{
                    if(!Array.isArray(this.form.support)){
                        this.form.support = this.intarrFun(this.form.support);
                    }
                }
                if(!this.form.industry_type){
                    this.form.industry_type = [];
                }else{
                    if(!Array.isArray(this.form.industry_type)){
                        this.form.industry_type = this.intarrFun(this.form.industry_type);
                    }
                }
            },
            //数组转换字符串(提交之前  数据处理)
            stringFun(){
                if(Array.isArray(this.form.support)){
                    var supports = this.form.support;
                    this.form.support = supports.join();
                }
                if(Array.isArray(this.form.industry_type)){
                    var industry_types = this.form.industry_type;
                    this.form.industry_type = industry_types.join();
                }
            },
            //获取房源下拉
            optlist(data=Object()){

                if(window.localStorage.roomoptdata){
                    this.options = JSON.parse(window.localStorage.getItem("roomoptdata"));
                    console.log(this.options,this.tjstatus);
                    if(this.tjstatus == 1){
                        this.form.r_entrust_at = JSON.parse(window.localStorage.getItem("roomoptdata")).day;
                    }
                }else{
                    conf.room.optlist(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            // console.log(res);
                            //定位偶尔请求失败 res.data.data.city_name 返回null，地址默认为北京市
                            if(res.data.data.city_name){
                                this.options = res.data.data;
                                if(this.tjstatus == 1){
                                    this.form.r_entrust_at = res.data.data.day;
                                }
                                
                                let obj = JSON.stringify(res.data.data); //转化为JSON字符串
                                window.localStorage.setItem("roomoptdata", obj);
                            }else{
                                this.optlist();
                            }

                            

                        }else if (state == 'success'&&res.data.code != 0){
                            if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                        }
                    })
                }
                
            },
            //获取客源下拉
            custoptlist(data=Object()){
                if(window.localStorage.customeroptdata){
                    this.customeroptlist = JSON.parse(window.localStorage.getItem("customeroptdata"));
                }else{
                    conf.resources.optlist(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            // console.log(res);
                            this.customeroptlist = res.data.data;
                            
                            let obj = JSON.stringify(res.data.data); //转化为JSON字符串
                            window.localStorage.setItem("customeroptdata", obj);

                        }else if (state == 'success'&&res.data.code != 0){
                            if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                        }
                    })
                }
                
            },
            //楼盘字典检索
            buildingquerySearchAsync(queryString,cb,data=Object()){
                // console.log(queryString);
                if(queryString != ''){
                    data.p_id = this.options.province_code;
                    data.c_id = this.options.city_code;
                    // data.a_id = this.form.a_id;
                    data.w_spell = queryString;
                    conf.buildingdictionary.search(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            // console.log(res);
                            this.buildingOpt = res.data.data;
                            cb(this.buildingOpt);
                            
                        }else if (state == 'success'&&res.data.code != 0){
                            if (res.data.code == -404){   //暂无数据     跳转添加 楼盘字典
                                this.buildingOpt = [{
                                    value: '暂无数据'
                                }];
                                cb(this.buildingOpt);  
                            }else if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                        }
                    })
                }
                
            },
            //楼盘字典  失去焦点
            lpzdblur(data=Object()){
                //  添加setTimeout  为了避免blur事件触发于select事件之前，搜索楼盘字典的字段为input选中之前的值
                setTimeout(() => {
                    // console.log(this.form.building_id);
                    // console.log('----------blur-----------------',this.form.building_id);
                    if(this.form.building_id){
                        data.w_name = this.form.building_id;
                        conf.buildingdictionary.getid(data,(state,res)=>{
                            if (state == 'success'&&res.data.code == 0){
                                // console.log(res);
                                this.buildingId = res.data.data;

                                this.form.building_s = this.buildingOpt[0].w_building_house;  //楼盘字典对应的建房年代
                                this.form.use_type = this.buildingOpt[0].w_purpose_id;  //楼盘字典对应的用途
                                this.form.housing_types = this.buildingOpt[0].w_type_id;  //楼盘字典对应的类型

                                if(this.form.use_type){
                                    //3 住宅 、4 商住 、14 其他
                                    //5 商铺 、6 网点 、10 铺厂 
                                    //7 写字楼 、9 写厂
                                    //8 厂房
                                    //11 仓库
                                    //12 地皮 
                                    //13 车位
                                    switch(this.form.use_type){
                                        case 3:
                                            this.typeOne = 1;
                                            this.detailNone = true;
                                            this.detailTit = '住宅明细';
                                            break;
                                        case 4:
                                            this.typeOne = 1;
                                            this.detailNone = true;
                                            this.detailTit = '商住明细';
                                            break;
                                        case 5:
                                            this.typeOne = 2;
                                            this.detailNone = true;
                                            this.detailTit = '商铺明细';
                                            break;
                                        case 6:
                                            this.typeOne = 2;
                                            this.detailNone = true;
                                            this.detailTit = '网点明细';
                                            break;
                                        case 7:
                                            this.typeOne = 3;
                                            this.detailNone = true;
                                            this.detailTit = '写字楼明细';
                                            break;
                                        case 8:
                                            this.typeOne = 4;
                                            this.detailNone = true;
                                            this.detailTit = '厂房明细';
                                            break;
                                        case 9:
                                            this.typeOne = 3;
                                            this.detailNone = true;
                                            this.detailTit = '写厂明细';
                                            break;
                                        case 10:
                                            this.typeOne = 2;
                                            this.detailNone = true;
                                            this.detailTit = '铺厂明细';
                                            break;
                                        case 11:
                                            this.typeOne = 5;
                                            this.detailNone = true;
                                            this.detailTit = '仓库明细';
                                            break;
                                        case 12:
                                            this.typeOne = 6;
                                            this.detailNone = true;
                                            this.detailTit = '地皮明细';
                                            break;
                                        case 13:
                                            this.typeOne = 7;
                                            this.detailNone = false;
                                            break;
                                        case 14:
                                            this.typeOne = 1;
                                            this.detailNone = false;
                                            break;
                                    }
                                }

                                this.repeatFun();
                            }else if (state == 'success'&&res.data.code != 0){
                                if (res.data.code == 323){   //该楼盘不存在     跳转添加 楼盘字典
                                    this.lpzdhandleSelect(this.form.building_id,1);
                                }else if(res.data.code == 401){
                                    this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.data.msg
                                    });
                                }
                            }
                        })
                    }
                }, 1000)
                
            },
            //楼盘字典   点击选中建议项时触发  在输入没有任何匹配建议的情况下，按下回车触发
            lpzdhandleSelect(item,types,data=Object()){
                // console.log('-------------select------------',item,types,this.form.building_id);
                this.form.building_s = item.w_building_house;  //楼盘字典对应的建房年代
                this.form.use_type = item.w_purpose_id;  //楼盘字典对应的用途
                this.form.housing_types = item.w_type_id;  //楼盘字典对应的类型

                if(this.form.use_type){
                    //3 住宅 、4 商住 、14 其他
                    //5 商铺 、6 网点 、10 铺厂 
                    //7 写字楼 、9 写厂
                    //8 厂房
                    //11 仓库
                    //12 地皮 
                    //13 车位
                    switch(this.form.use_type){
                        case 3:
                            this.typeOne = 1;
                            this.detailNone = true;
                            this.detailTit = '住宅明细';
                            break;
                        case 4:
                            this.typeOne = 1;
                            this.detailNone = true;
                            this.detailTit = '商住明细';
                            break;
                        case 5:
                            this.typeOne = 2;
                            this.detailNone = true;
                            this.detailTit = '商铺明细';
                            break;
                        case 6:
                            this.typeOne = 2;
                            this.detailNone = true;
                            this.detailTit = '网点明细';
                            break;
                        case 7:
                            this.typeOne = 3;
                            this.detailNone = true;
                            this.detailTit = '写字楼明细';
                            break;
                        case 8:
                            this.typeOne = 4;
                            this.detailNone = true;
                            this.detailTit = '厂房明细';
                            break;
                        case 9:
                            this.typeOne = 3;
                            this.detailNone = true;
                            this.detailTit = '写厂明细';
                            break;
                        case 10:
                            this.typeOne = 2;
                            this.detailNone = true;
                            this.detailTit = '铺厂明细';
                            break;
                        case 11:
                            this.typeOne = 5;
                            this.detailNone = true;
                            this.detailTit = '仓库明细';
                            break;
                        case 12:
                            this.typeOne = 6;
                            this.detailNone = true;
                            this.detailTit = '地皮明细';
                            break;
                        case 13:
                            this.typeOne = 7;
                            this.detailNone = false;
                            break;
                        case 14:
                            this.typeOne = 1;
                            this.detailNone = false;
                            break;
                    }
                }

                if(types){
                    this.lpzdcenterDialogVisible = true;
                    this.editcont.w_room_name = item;
                }else{
                    // console.log(this.form.building_id);
                    if(this.form.building_id){
                        data.w_name = this.form.building_id;
                        conf.buildingdictionary.getid(data,(state,res)=>{
                            if (state == 'success'&&res.data.code == 0){
                                this.buildingId = res.data.data;
                            }else if (state == 'success'&&res.data.code != 0){
                                if (res.data.code == 323){   //该楼盘不存在     跳转添加 楼盘字典
                                    this.lpzdcenterDialogVisible = true;
                                    this.editcont.w_room_name = item;
                                    // this.$router.push({
                                    //     path: '/buildingdictionary',
                                    //     query: {
                                    //         value: this.form.building_id
                                    //     }
                                    // })
                                }else if(res.data.code == 401){
                                    this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.data.msg
                                    });
                                }
                            }
                        })
                    }
                }

            },
            //栋座检索
            fewFun(queryString, cb,data=Object()){

                setTimeout(() => {
                    if(this.form.building_id == ''){
                        this.$message({
                            type: 'info',
                            message: '请先选择楼盘字典',
                            duration: 1000
                        });
                    }else{

                        data.w_name = this.form.building_id;
                        conf.buildingdictionary.pedestal(data,(state,res)=>{
                            if (state == 'success'&&res.data.code == 0){
                                // console.log(res);
                                this.fewOpt = res.data.data;
                                cb(this.fewOpt);
                            }else if (state == 'success'&&res.data.code != 0){

                                if(res.data.code == 401){
                                    this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                                }else{
                                    // this.$message({
                                    //     type: 'info',
                                    //     message: res.data.msg
                                    // });
                                }
                            }
                        })
                    }
                }, 1000)
                
            },
            //栋座   失去焦点
            dzblur(data=Object()){
                this.repeatFun();
            },
            //栋座 点击选中建议项时触发  在输入没有任何匹配建议的情况下，按下回车触发
            dzhandleSelect(item){
                // console.log(item);
            },
            //位置检索
            unitFun(queryString, cb,data=Object()){
                if(this.form.few_building == ''){
                    this.$message({
                        type: 'info',
                        message: '请先选择栋座',
                        duration: 1000
                    });
                }else{

                    data.b_building = this.form.few_building;
                    data.b_w_id = this.buildingId;
                    conf.buildingdictionary.positions(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            // console.log(res);
                            this.positionOpt = res.data.data;
                            cb(this.positionOpt);
                        }else if (state == 'success'&&res.data.code != 0){

                            if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                // this.$message({
                                //     type: 'info',
                                //     message: res.data.msg
                                // });
                            }

                        }
                    })
                }
            },
            //位置 点击选中建议项时触发  在输入没有任何匹配建议的情况下，按下回车触发
            wzhandleSelect(item){
                // console.log(item);
            },
            //位置   失去焦点
            wzdblur(){
                this.repeatFun();
            },
            //房号   失去焦点
            fhblur(){
                var reg = /\d+/g;  //正则筛选第一个数字或者连续的数字    例 a12b4    结果12
                if(this.form.room_number){
                    //正则筛选楼层
                    if(this.form.room_number.match(reg)[0] < 100){
                        if(this.form.floor == ''){  //楼层为空时，再进行赋值
                            this.form.floor = this.form.room_number.match(reg)[0];
                        }
                    }else if(this.form.room_number.match(reg)[0] >= 100 && this.form.room_number.match(reg)[0] < 1000){
                        if(this.form.floor == ''){
                            this.form.floor = this.form.room_number.match(reg)[0].substr(0,1);
                        }
                    }else if(this.form.room_number.match(reg)[0] >= 1000 && this.form.room_number.match(reg)[0] < 10000){
                        if(this.form.floor == ''){
                            this.form.floor = this.form.room_number.match(reg)[0].substr(0,2);
                        } 
                    }
                }
                this.repeatFun();
            },
            // 交易类型  change  
            transactChange(val){
                // console.log(val);
                //93 出售、94 出租 、95 租售
                if(val === 93){
                    this.transaction = 1;
                    //清空出租数据
                    this.form.rents = '0.0';
                    this.form.rents_type = 705;
                    this.form.rents_unit_price = '0.00';
                    this.form.floor_price = '0.0';
                }else if(val === 94){
                    this.transaction = 2;
                    //清空出售数据
                    this.form.price = '0.00';
                    this.form.unit_price = '0';
                    this.form.sale_floor_price = '0.0';
                }else if(val === 95){
                    this.transaction = 3;
                }
            },
            //售价  失去焦点
            sprice_blur(){
                if(this.form.price == ''){
                    this.form.price = 0.00;
                }else{
                    this.form.price = parseFloat(this.form.price).toFixed(2);
                    if(this.sale_floor_price_first === 0){  //根据售价设置默认底价（只设置一次）    toFixed 四舍五入保留一位小数
                        this.form.sale_floor_price = parseFloat(this.form.price).toFixed(1);
                        this.sale_floor_price_first = 1;
                    }
                    this.form.unit_price = parseInt((this.form.price * 10000) / this.form.r_acreage);   //  每平方米售价 = 售价（万元） /  面积
                }
            },
            //售价  每平方米价位  失去焦点
            unit_blur(){
                if(this.form.unit_price == ''){
                    this.form.unit_price = 0;
                }else{
                    this.form.price = parseFloat((this.form.unit_price * this.form.r_acreage)/10000).toFixed(2);   //售价（万元） = 每平方米售价 * 面积
                }
            },
            //租价  失去焦点
            rents_blur(){
                if(this.form.rents == ''){
                    this.form.rents = 0.0;
                }else{
                    this.form.rents = parseFloat(this.form.rents).toFixed(1);
                    if(this.rents_floor_price_first === 0){  //根据租价设置默认底价（只设置一次）    toFixed 四舍五入保留一位小数
                        this.form.floor_price = this.form.rents;
                        this.rents_floor_price_first = 1;
                    }
                    this.form.rents_unit_price = parseFloat(this.form.rents / this.form.r_acreage).toFixed(2);   //  每平方米租价 = 租价 /  面积
                }
            },
            //租价  每平方米价位  失去焦点
            rents_unit_blur(){
                if(this.form.rents_unit_price == ''){
                    this.form.rents_unit_price = 0.00;
                }else{
                    this.form.rents = parseFloat(this.form.rents_unit_price * this.form.r_acreage).toFixed(1);   //租价 = 每平方米售价 * 面积
                }
            },
            //判断是否有相同电话号码
            repeat_telphone(data=Object()){
                var MobileRegex = /^1[3|4|5|7|8][0-9]{9}$/;
                if (MobileRegex.test(this.form.owner_phone)) {
                    data.owner_phone = this.form.owner_phone;
                    if(this.tjstatus == 2){
                        data.id = this.r_id;
                    }
                    conf.room.validateTel(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){  //有重复
                            // console.log(res);
                            this.repeat_number = res.data.data;
                            this.telphonedialogVisible = true;
                        }else if (state == 'success'&&res.data.code != 0){   
                            if(res.data.code == 324){ //可以添加
                                
                            }else if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                            
                        }
                    })
                }
            },
            /*返回列表 */
            cancel (formName) {
                this.$router.push({name:'room'})
            },
            /*提交 */
            submit (formName) {
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        this.judgeprimise();
                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            },
            /*判断提交 */
            judgeprimise (data=Object()) {
                // this.preservation = false;  //不可保存
                
                //用于列表检索条件的字段   房型（房）、层数、朝向
                this.form.ri_room_type = this.form.r_info.room_s;
                this.form.ri_numbe_layers = this.form.r_info.number_layers;
                this.form.ri_oriented = this.form.r_info.orientation;
                //配套、行业   多选下拉         数组转字符串
                this.stringFun();
                // console.log(this.tjstatus);
                if (this.tjstatus == 1) {
                    // console.log(typeof(this.form.r_info));
                    // console.log(this.form.r_info);
                    conf.room.add(this.form,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            
                            this.$message({
                                type: 'success',
                                message: '添加成功!',
                                duration: 1000
                            });
                            this.r_id = res.data.data.rid;  //房源id

                            this.followstatus = true;   //可添加跟进
                            //传数据至父组件
                            this.$emit('keepevent',res,this.tjstatus);

                            this.tjstatus = 2;
                            // this.customer = res.data.data.customers_list;  //客源信息
                            // //房源  底部信息 内容
                            // this.important_information = res.data.data.important_information;
                            // this.followlist();  //获取房源跟进列表

                            // //配套  行业   字符串转换为数组
                            this.strarrFun();

                        }else if(state == 'success'&&res.data.code != 0){
                                
                                if(res.data.code == 401){
                                    this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.data.msg
                                    });
                                }
                                // //配套  行业   字符串转换为数组
                                this.strarrFun();
                            
                        }
                    })
                }else if (this.tjstatus == 2){
                   //页面数据data 初始数据initialData
                    data = this.form;
                    data.id = this.r_id;
                    //初始数据
                    var initialData = JSON.parse(sessionStorage.getItem("editroomrow"));
                    if(data.status != initialData.status){
                        //状态权限
                        if(initialData.status == 97 && data.status == 98){
                            //有效-预定
                            if(this.ownerPermissionArr.indexOf(this.permissionFieldArr.qx_room_youxiaoyuding) == -1){
                                 alert("您没有权限编辑该状态");
                                return;
                            }
                        }else if(initialData.status == 97 && (data.status == 99 || data.status == 101)){
                             //有效-已售/我售
                             if(this.ownerPermissionArr.indexOf(this.permissionFieldArr.qx_room_youxiaoyishou) == -1){
                                 alert("您没有权限编辑该状态");
                                return;
                            }
                        }else if(initialData.status == 97 && (data.status == 100 || data.status == 102)){
                            //有效-已租/我租
                             if(this.ownerPermissionArr.indexOf(this.permissionFieldArr.qx_room_youxiaoyizu) == -1){
                                 alert("您没有权限编辑该状态");
                                return;
                            }
                        }else if(initialData.status == 97 && data.status != 97){
                            //有效-其他
                             if(this.ownerPermissionArr.indexOf(this.permissionFieldArr.qx_room_youxiaoqita) == -1){
                                 alert("您没有权限编辑该状态");
                                return;
                            }
                        }else if(initialData.status == 98 && data.status != 98){
                            //预定-非预定
                             if(this.ownerPermissionArr.indexOf(this.permissionFieldArr.qx_room_yudingfeiyuding) == -1){
                                 alert("您没有权限编辑该状态");
                                return;
                            }
                        }else if(initialData.status != 97 && data.status == 97){
                            //非有效-有效
                             if(this.ownerPermissionArr.indexOf(this.permissionFieldArr.qx_room_feiyouxoapyuding) == -1){
                                 alert("您没有权限编辑该状态");
                                return;
                            }
                        }   
                    }

                    if(!permconfig.qx_room_liebiao_bianji_function(initialData)){
                        alert("您没有权限编辑该数据");
                        return;
                    }

                    if(this.form.status == 97 && this.entrust_time_confirm_status === false){   //判断当前状态是否为 有效 
                        if(this.entrust_time_status !== ''){  //判断是否是由之前的状态改变为 有效 的   （若为空，则否。若不为空，则是）
                            this.entrustdialogVisible = true;
                            return;
                        }
                    }
                    // console.log('提交之前',data.support);
                    conf.room.edit(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            // console.log('提交之后  code  0',data.support);
                            // console.log(res);
                            this.$message({
                                type: 'success',
                                message: '修改成功!',
                                duration: 1000
                            });
                            //传数据至父组件   添加修改成功   res为返回的数据   this.tjstatus为添加修改的状态
                            this.$emit('keepevent',res,this.tjstatus);
                            //房源  底部信息 内容
                            // this.important_information = res.data.data.important_information;
                            // this.customer = res.data.data.customers_list;  //客源信息
                            // this.followlist();  //获取房源跟进列表

                            //修改房源信息成功 将数据存储sessionStorage，减少http请求，避免刷新頁面時數據丟失
                            sessionStorage.setItem("editroomrow", JSON.stringify(data));
                            // console.log(this.editroomrowdata);

                            //权限
                            permconfig.qx_room_shangchauntupian(data, (res)=>{  //添加房源图
                                if(!res){
                                    this.addpicPermission = true;
                                }
                            })

                            permconfig.qx_room_xiugaitupian(data, (res)=>{  //删除房源图
                                if(!res){
                                    this.delpicPermission = true;
                                }
                            })
                            
                            //配套  行业   字符串转换为数组
                            this.strarrFun();
                            
                        }else if(state == 'success'&&res.data.code != 0){
                            // console.log(res);
                            
                            if(res.data.code == 325){  //需要进行业绩分配
                                //配套  行业 数组转字符串
                                // console.log('提交之后  code  325',data.support);
                                // console.log('提交之后   存值之前',data.support);
                                this.achievementeditinfo = data;    //存储需要修改的数据信息
                                // console.log(this.achievementeditinfo.support);
                                this.achievementVisible = true;
                            }else if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                            // //配套  行业   字符串转换为数组
                            this.strarrFun();
                        }
                    })
                }
            },
            //添加房源跟进
            followup(){
                this.gjdialogFormVisible = true;
            },
            //取消房源跟进
            gjcancel(formName){
                this.$refs[formName].resetFields();
            },
            //提交房源跟进
            gjsubmit(formName,data=Object()){
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        data = this.followform;
                        data.f_room_id = this.r_id;
                        if(this.followform.cfs_remind_time){
                            if(this.followform.cfs_content == ''){
                                this.$message({
                                    type: 'info',
                                    message: '请输入提醒内容',
                                    duration: 1000
                                });
                                return;
                            }else if(this.followform.cfs_user_id == ''){
                                this.$message({
                                    type: 'info',
                                    message: '请选择被提醒人',
                                    duration: 1000
                                });
                                return;
                            }
                        }
                        //跟进方式  为看房时  提交该客户的客源id
                        if(this.followform.f_follow_up_way == 3){
                            
                            if(this.c_id == ''){
                                this.$message({
                                    type: 'info',
                                    message: '请选择看房客源',
                                    duration: 1000
                                });
                                return;
                            }else{
                                this.followform.f_customers_id = this.c_id;
                            }
                        }else{
                            this.followform.f_customers_id = '';
                            //初始化  已选择的客源编号与姓名   避免影响别处
                            this.c_numbering = '';
                            this.c_user_name = '';
                        }
                        conf.room.follow(data,(state,res)=>{
                            if (state == 'success'&&res.data.code == 0){
                                // console.log(res);
                                this.$message({
                                    type: 'success',
                                    message: '添加成功!',
                                    duration: 1000
                                });
                                this.gjdialogFormVisible = false;
                                this.c_numbering = '';
                                this.c_user_name = '';
                                //传数据至父组件   添加跟进成功   res为返回的数据
                                this.$emit('followevent',this.r_id);
                                // this.followlist();
                            }else if(state == 'success'&&res.data.code != 0){
                                if(res.data.code == 401){
                                    this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.data.msg
                                    });
                                }
                            }
                        })

                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            },
            //跟进方式改变
            changetype(val){
                // console.log(val);
                if(val == 3){  
                    this.followform.f_customers_id = val;
                }else{
                    this.followform.f_customers_id = '';
                }
            },
            //下次提醒日期改变
            changedate(val){
                // console.log(val);
                if(val){
                    this.remind = true;
                }else{
                    this.remind = false;
                    this.followform.cfs_remind_time = '';
                    this.followform.cfs_user_id = '';
                    this.followform.cfs_content = '';
                }
            },
            //选择客源
            choose_customer(){
                //清空搜索条件
                // this.customerform.c_secondary_area = '';
                // this.customerform.c_trading_type = '';
                // this.customerform.c_buy_status = '';
                // this.customerform.c_store_id = '';
                // this.customerform.c_employees_id = '';
                // this.customerform.keywords = '';
                // this.customerData = [];

                this.choosekydialogTableVisible = true;
            },
            //确认选择  客源
            changecustomerbtn(row){
                // console.log(row);
                this.c_id = row.c_id;
                this.c_numbering = row.c_numbering;
                this.c_user_name = row.c_user_name;
                this.choosekydialogTableVisible = false;
            },
            //客源列表
            customerlist(data=Object()){
                // console.log(data);
                conf.resources.list(data,(state,res)=>{
                    if (state == 'success'&&res.data.code == 0){
                        // console.log(res);
                        this.customerData = res.data.data.data;
                    }else if(state == 'success'&&res.data.code != 0){
                        if(res.data.code == 401){
                            this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.data.msg
                            });
                        }
                    }
                })
                
            },
            //查询客源
            searchbtn(formName){
                let data = this.customerform;
                this.customerlist(data);
            },
            //取消  修改状态为 有效  委托时间
            entrustcancel(){
                this.entrustdialogVisible = false;
                this.entrust_time_confirm_status = true;
            },
            //确认  修改状态为 有效  委托时间
            entrustsubmit(){
                this.form.r_entrust_at = this.options.day;  //委托时间修改为今天
                this.entrustdialogVisible = false;
                this.entrust_time_confirm_status = true;
            },
            //确认  相同电话号码
            telphonesubmit(){
                this.telphonedialogVisible = false;
            },
            //判断是否有相同电话号码
            repeat_telphone(data=Object()){
                var MobileRegex = /^1[3|4|5|7|8][0-9]{9}$/;
                if (MobileRegex.test(this.form.owner_phone)) {
                    data.owner_phone = this.form.owner_phone;
                    if(this.tjstatus == 2){
                        data.id = this.r_id;
                    }
                    conf.room.validateTel(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){  //有重复
                            // console.log(res);
                            this.repeat_number = res.data.data;
                            this.telphonedialogVisible = true;
                        }else if (state == 'success'&&res.data.code != 0){   
                            if(res.data.code == 324){ //可以添加
                                
                            }else if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                            
                        }
                    })
                }
            },
            //业绩分配   添加部门员工
            add_user(){
                let cope = {user_id:'',percent:'',department_id:''}
                this.achievement_userlist.push(cope);
            },
            //业绩分配   删除
            del_user(ind){
                this.achievement_userlist.splice(ind,1);
            },
            //业绩分配  类型（多人、单人）  change
            atypechange(val){
                if(val == 1){  //单人
                    this.achievementaddbtn = false;
                    this.achievement_userlist = [{user_id:'',percent:'100',department_id:''}];
                }else if(val == 2){  //多人
                    this.achievementaddbtn = true;
                    this.achievement_userlist = [{user_id:'',percent:'',department_id:''}];
                }
            },
            //业绩分配  取消
            achievementcancel(formName){
                this.achievementVisible = false;
            },
            //业绩分配   提交
            achievementsubmit(formName,data=Object()){
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        data = this.achievementeditinfo;
                        if(this.choose_info_str == ''){
                            this.$message({
                                type: 'warning',
                                message: '请选择客源信息',
                                duration: 1000
                            });
                        }
                        var all_rate = 0;
                        var a_rate = '';
                        var a_uid = '';
                        if(this.achievement_userlist.length == 1){
                            if(this.achievement_userlist[0].user_id == '' || this.achievement_userlist[0].percent == ''){
                                this.$message({
                                    type: 'warning',
                                    message: '请填写完整',
                                    duration: 1000
                                });
                                return;
                            }else{
                                if(this.achievement_userlist[0].percent != 100){
                                    this.$message({
                                        type: 'warning',
                                        message: '请输入正确的业绩分配比例',
                                        duration: 1000
                                    });
                                    return;
                                }else{
                                    data.a_rate = this.achievement_userlist[0].percent;
                                    data.a_uid = this.achievement_userlist[0].user_id;
                                }
                                
                            }
                            
                        }else{               
                            for(var i = 0;i<this.achievement_userlist.length;i++){
                                if(this.achievement_userlist[i].user_id == '' || this.achievement_userlist[i].percent == ''){
                                    this.$message({
                                        type: 'warning',
                                        message: '请填写完整',
                                        duration: 1000
                                    });
                                    return;
                                }else{
                                    all_rate += parseFloat(this.achievement_userlist[i].percent);
                                    
                                    a_rate += this.achievement_userlist[i].percent +',';
                                    a_uid += this.achievement_userlist[i].user_id +',';
                                }
                            }
                            if(all_rate != 100){
                                this.$message({
                                    type: 'warning',
                                    message: '请输入正确的业绩分配比例',
                                    duration: 1000
                                });
                                return;
                            }else{
                                data.a_rate = a_rate.substr(0,a_rate.length-1);
                                data.a_uid = a_uid.substr(0,a_uid.length-1);
                            } 
                        }
                        data.id = this.r_id;
                        data.c_id = this.c_id;
                        data.a_type = this.achievementform.a_type;
                        data.a_money = this.achievementform.a_money;
                        data.a_remark = this.achievementform.a_remark;
                        // console.log('业绩分配提交之前',data.support);
                        conf.room.addachievement(data,(state,res)=>{
                            if (state == 'success'&&res.data.code == 0){
                                // console.log(res);
                                this.$message({
                                    type: 'success',
                                    message: '修改成功!',
                                    duration: 1000
                                });
                                this.achievementVisible = false;
                                this.c_numbering = '';
                                this.c_user_name = '';
                                //修改房源信息成功 将数据存储sessionStorage，减少http请求，避免刷新頁面時數據丟失
                                sessionStorage.setItem("editroomrow", JSON.stringify(data));

                                this.customer = res.data.data.customers_list;  //客源信息
                                this.followlist();  //获取房源跟进列表
                                //配套  行业   字符串转换为数组
                                this.strarrFun();
                            }else if(state == 'success'&&res.data.code != 0){
                                if(res.data.code == 401){
                                    this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.data.msg
                                    });
                                }
                            }
                        })

                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            },
            //添加房源之前根据、区code、楼盘字典ID 栋座内容 位置内容 房号 查询该房源是不是重复录入
            repeatFun(data=Object()){

                if(this.form.building_id != '' && this.form.few_building != '' && this.form.position != '' && this.form.room_number != ''){
                    if(this.r_id != ''){  //房源ID 添加的时候 不传 修改的时候传房源的ID
                        data.r_id = this.r_id;
                    }
                    // data.a_id = this.form.a_id;
                    data.building_id = this.form.building_id;
                    data.few_building = this.form.few_building;
                    data.position = this.form.position;
                    data.room_number = this.form.room_number;

                    conf.room.repeat(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            // console.log(res);
                            
                            this.repeatData = res.data.data;
                            this.property_number = res.data.data.property_number;
                            this.repeatdialogVisible = true;
                        }else if (state == 'success'&&res.data.code != 0){
                            if (res.data.code == 323){
                                //楼盘不存在
                            }else if(res.data.code == 324){
                                //可以添加房源
                            }else if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                        }
                    })
                }           
            },
            //取消  查看房源重复
            repeatcancel(){
                this.repeatdialogVisible = false;
            },
            //重複房源信息  
            repeatsubmit(){
                this.repeatdialogVisible = false;
                console.log(this.repeatData);
                this.r_id = this.repeatData.id;
                this.tjstatus = 2;

                this.form = this.repeatData;

                //修改重複房源信息时 将数据存储sessionStorage，减少http请求 ，避免刷新頁面時數據丟失
                sessionStorage.setItem("editroomrow", JSON.stringify(this.repeatData));

                //重复房源的内容
                // this.form.a_id = this.repeatData.a_id;

                // this.buildingId = this.repeatData.building_id;
                this.form.building_id = this.repeatData.building_name;

                this.form.use_type = this.transformInt(this.repeatData.use_type);
                if(this.form.use_type){
                    //3 住宅 、4 商住 、14 其他
                    //5 商铺 、6 网点 、10 铺厂 
                    //7 写字楼 、9 写厂
                    //8 厂房
                    //11 仓库
                    //12 地皮 
                    //13 车位
                    switch(this.form.use_type){
                        case 3:
                            this.typeOne = 1;
                            this.detailNone = true;
                            this.detailTit = '住宅明细';
                            break;
                        case 4:
                            this.typeOne = 1;
                            this.detailNone = true;
                            this.detailTit = '商住明细';
                            break;
                        case 5:
                            this.typeOne = 2;
                            this.detailNone = true;
                            this.detailTit = '商铺明细';
                            break;
                        case 6:
                            this.typeOne = 2;
                            this.detailNone = true;
                            this.detailTit = '网点明细';
                            break;
                        case 7:
                            this.typeOne = 3;
                            this.detailNone = true;
                            this.detailTit = '写字楼明细';
                            break;
                        case 8:
                            this.typeOne = 4;
                            this.detailNone = true;
                            this.detailTit = '厂房明细';
                            break;
                        case 9:
                            this.typeOne = 3;
                            this.detailNone = true;
                            this.detailTit = '写厂明细';
                            break;
                        case 10:
                            this.typeOne = 2;
                            this.detailNone = true;
                            this.detailTit = '铺厂明细';
                            break;
                        case 11:
                            this.typeOne = 5;
                            this.detailNone = true;
                            this.detailTit = '仓库明细';
                            break;
                        case 12:
                            this.typeOne = 6;
                            this.detailNone = true;
                            this.detailTit = '地皮明细';
                            break;
                        case 13:
                            this.typeOne = 7;
                            this.detailNone = false;
                            break;
                        case 14:
                            this.typeOne = 1;
                            this.detailNone = false;
                            break;
                    }
                }

                this.form.housing_types = this.transformInt(this.repeatData.housing_types);
                this.form.type_of_house_sale = this.transformInt(this.repeatData.type_of_house_sale);
                this.form.rents_type = this.transformInt(this.repeatData.rents_type);
                this.form.entrust_way = this.transformInt(this.repeatData.entrust_way);
                this.form.source_type = this.transformInt(this.repeatData.source_type);
                this.form.status_quo = this.transformInt(this.repeatData.status_quo);
                this.form.decoration = this.transformInt(this.repeatData.decoration);
                this.form.furniture = this.transformInt(this.repeatData.furniture);
                this.form.appliance = this.transformInt(this.repeatData.appliance);
                this.form.rights_type = this.transformInt(this.repeatData.rights_type);
                this.form.certificate_type = this.transformInt(this.repeatData.certificate_type);
                this.form.payment_type = this.transformInt(this.repeatData.payment_type);
                this.form.pay_on_type = this.transformInt(this.repeatData.pay_on_type);
                this.form.checking_way = this.transformInt(this.repeatData.checking_way);
                this.form.dorm_type = this.transformInt(this.repeatData.dorm_type);
                this.form.canteen_type = this.transformInt(this.repeatData.canteen_type);
                this.form.air_type = this.transformInt(this.repeatData.air_type);
                this.form.wc_type = this.transformInt(this.repeatData.wc_type);
                this.form.fence_type = this.transformInt(this.repeatData.fence_type);
                this.form.lot_type = this.transformInt(this.repeatData.lot_type);


                this.form.r_d_id = parseInt(window.localStorage.getItem('did'));
                this.form.source_uid = parseInt(window.localStorage.getItem('uid'));

                if(typeof(this.repeatData.r_info) == 'string'){  //其他自定义字段
                    // console.log(JSON.parse(this.repeatData.r_info));
                    this.form.r_info = JSON.parse(this.repeatData.r_info);
                }

                if(typeof(this.repeatData.r_detaile_list) == 'string'){  //明细
                    // console.log(JSON.parse(this.repeatData.r_info));
                    this.form.r_detaile_list = JSON.parse(this.repeatData.r_detaile_list);
                }

                this.form.ri_room_type = this.repeatData.ri_room_type;
                this.form.ri_numbe_layers = this.repeatData.ri_numbe_layers;
                this.form.ri_oriented = this.repeatData.ri_oriented;

                this.followstatus = true;   //可添加跟进

                //配套  行业   字符串转换为数组
                this.strarrFun();
            },
            // 用途 change
            typeChange(val){
                // console.log(val);
                //3 住宅 、4 商住 、14 其他
                //5 商铺 、6 网点 、10 铺厂 
                //7 写字楼 、9 写厂
                //8 厂房
                //11 仓库
                //12 地皮 
                //13 车位
                switch(val){
                    case 3:
                        this.typeOne = 1;
                        this.detailNone = true;
                        this.detailTit = '住宅明细';
                        this.initOne();
                        break;
                    case 4:
                        this.typeOne = 1;
                        this.detailNone = true;
                        this.detailTit = '商住明细';
                        this.initOne();
                        break;
                    case 5:
                        this.typeOne = 2;
                        this.detailNone = true;
                        this.detailTit = '商铺明细';
                        this.initTwo();
                        break;
                    case 6:
                        this.typeOne = 2;
                        this.detailNone = true;
                        this.detailTit = '网点明细';
                        this.initTwo();
                        break;
                    case 7:
                        this.typeOne = 3;
                        this.detailNone = true;
                        this.detailTit = '写字楼明细';
                        this.initThree();
                        break;
                    case 8:
                        this.typeOne = 4;
                        this.detailNone = true;
                        this.detailTit = '厂房明细';
                        this.initFour();
                        break;
                    case 9:
                        this.typeOne = 3;
                        this.detailNone = true;
                        this.detailTit = '写厂明细';
                        this.initThree();
                        break;
                    case 10:
                        this.typeOne = 2;
                        this.detailNone = true;
                        this.detailTit = '铺厂明细';
                        this.initTwo();
                        break;
                    case 11:
                        this.typeOne = 5;
                        this.detailNone = true;
                        this.detailTit = '仓库明细';
                        this.initFive();
                        break;
                    case 12:
                        this.typeOne = 6;
                        this.detailNone = true;
                        this.detailTit = '地皮明细';
                        this.initSix();
                        break;
                    case 13:
                        this.typeOne = 7;
                        this.detailNone = false;
                        this.initSeven();
                        break;
                    case 14:
                        this.typeOne = 1;
                        this.detailNone = false;
                        this.initOne();
                        break;
                }
            },
            //初始化数据  this.typeOne = 1
            initOne(){
                this.form.r_acreage = '';  //面积
                this.form.housing_types = '';  //房屋类型 
                this.form.type_of_house_sale = '';  //房屋出售类型
                this.form.disc_type = '';  //盘类型
                this.form.r_info.inside = '';  //套内
                this.form.r_info.some_price = '';  //原购价 转让费  空调费  停车费  电功率
                this.form.status_quo = '';  //现状
                this.form.decoration = '';  //装修
                this.form.support = [];  //配套
                this.form.rights_type = ''; //产权
                this.form.certificate_type = '';  //证件
            },
            //初始化数据  this.typeOne = 2
            initTwo(){
                this.form.r_acreage = '';  //面积
                this.form.housing_types = '';  //房屋类型 
                this.form.type_of_house_sale = '';  //房屋出售类型
                this.form.disc_type = '';  //盘类型
                this.form.r_info.position = '';  //位置
                this.form.r_info.layer_height = '';  //层高
                this.form.r_info.number_layers = '';  //层数
                this.form.r_info.some_price = '';  //原购价 转让费  空调费  停车费  电功率
                this.form.status_quo = '';  //现状
                this.form.decoration = '';  //装修
                this.form.rights_type = ''; //产权
                this.form.certificate_type = '';  //证件
                this.form.wc_type = '';  //厕所
            },
            //初始化数据  this.typeOne = 3
            initThree(){
                this.form.r_acreage = '';  //面积
                this.form.housing_types = '';  //房屋类型 
                this.form.type_of_house_sale = '';  //房屋出售类型
                this.form.disc_type = '';  //盘类型
                this.form.r_info.layer_height = '';  //层高
                this.form.r_info.inside = '';  //套内
                this.form.r_info.number_layers = '';  //层数
                this.form.r_info.some_price = '';  //原购价 转让费  空调费  停车费  电功率
                this.form.status_quo = '';  //现状
                this.form.decoration = '';  //装修
                this.form.support = [];  //配套
                this.form.rights_type = ''; //产权
                this.form.certificate_type = '';  //证件
                this.form.wc_type = '';  //厕所
            },
            //初始化数据  this.typeOne = 4
            initFour(){
                this.form.housing_types = '';  //房屋类型 
                this.form.type_of_house_sale = '';  //房屋出售类型
                this.form.disc_type = '';  //盘类型
                this.form.r_info.dormitory_s = '';  //宿舍
                this.form.r_info.unit_length = '';  //长
                this.form.r_info.unit_width = '';  //宽
                this.form.r_info.unit_height = '';  //高
                this.form.r_info.work_office = '';  //办公
                this.form.r_info.vacant_land = '';  //空地
                this.form.r_info.unit_total = '';  //总计
                this.form.r_info.number_layers = '';  //层数
                this.form.r_info.some_price = '';  //原购价 转让费  空调费  停车费  电功率
                this.form.status_quo = '';  //现状
                this.form.fence_type = '';  //围墙
                this.form.support = [];  //配套
                this.form.dorm_type = '';  //宿舍
                this.form.canteen_type = '';  //食堂
                this.form.rights_type = ''; //产权
                this.form.certificate_type = '';  //证件
            },
            //初始化数据  this.typeOne = 5
            initFive(){
                this.form.housing_types = '';  //房屋类型 
                this.form.type_of_house_sale = '';  //房屋出售类型
                this.form.disc_type = '';  //盘类型
                this.form.r_info.dormitory_s = '';  //宿舍
                this.form.r_info.unit_length = '';  //长
                this.form.r_info.unit_width = '';  //宽
                this.form.r_info.unit_height = '';  //高
                this.form.r_info.work_office = '';  //办公
                this.form.r_info.vacant_land = '';  //空地
                this.form.r_info.unit_total = '';  //总计
                this.form.r_info.number_layers = '';  //层数
                this.form.r_info.some_price = '';  //原购价 转让费  空调费  停车费  电功率
                this.form.status_quo = '';  //现状
                this.form.fence_type = '';  //围墙
                this.form.support = [];  //配套
                this.form.dorm_type = '';  //宿舍
                this.form.canteen_type = '';  //食堂
                this.form.rights_type = ''; //产权
                this.form.certificate_type = '';  //证件
            },
            //初始化数据  this.typeOne = 6
            initSix(){
                this.form.r_acreage = '';  //面积
                this.form.housing_types = '';  //房屋类型 
                this.form.type_of_house_sale = '';  //房屋出售类型
                this.form.disc_type = '';  //盘类型
                this.form.r_info.length_s = '';  //长度
                this.form.r_info.width_s = '';  //宽度
                this.form.r_info.inside = '';  //套内
                this.form.r_info.some_price = '';  //原购价 转让费  空调费  停车费  电功率
                this.form.status_quo = '';  //现状
                this.form.fence_type = '';  //围墙
                this.form.support = [];  //配套
                this.form.dorm_type = '';  //宿舍
                this.form.canteen_type = '';  //食堂
                this.form.rights_type = ''; //产权
                this.form.certificate_type = '';  //证件
            },
            //初始化数据  this.typeOne = 7
            initSeven(){
                this.form.r_acreage = '';  //面积
                this.form.housing_types = '';  //房屋类型 
                this.form.type_of_house_sale = '';  //房屋出售类型
                this.form.disc_type = '';  //盘类型
                this.form.r_info.position = '';  //位置
                this.form.r_info.length_s = '';  //长度
                this.form.r_info.width_s = '';  //宽度
                this.form.r_info.some_price = '';  //原购价 转让费  空调费  停车费  电功率
                this.form.status_quo = '';  //现状
                this.form.fence_type = '';  //围墙
                this.form.support = [];  //配套
                this.form.dorm_type = '';  //宿舍
                this.form.canteen_type = '';  //食堂
                this.form.rights_type = ''; //产权
                this.form.certificate_type = '';  //证件
            },
            //查看房源图
            lookpic(row){
                console.log(row);
            },
            //删除房源图
            delpic(data=Object()){
                console.log(this.nowchoosepic,this.checkedCities,this.checkedCities.length);

                if(this.checkedCities.length == 0){

                    this.$message({
                        type: 'info',
                        message: '请先选择图片'
                    });
                }else{
                    this.$confirm('确定删除选中的图片吗?', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {

                        data.riu_id = this.checkedCities;
                        conf.room.delimg(data,(state,res)=>{
                            if (state == 'success'&&res.data.code == 0){
                                
                                this.picFun();
                                if(this.checkedCities.length == this.cities.length){  //全选
                                    this.nowPic = '';
                                    this.checkedCities = [];
                                }
                                
                                this.$message({
                                    type: 'success',
                                    message: '删除成功！'
                                });
                            }else if(state == 'success'&&res.data.code != 0){
                                if(res.data.code == 401){
                                    this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                                }else{

                                    this.piclist.push(file);
                                    this.$message({
                                        type: 'info',
                                        message: res.data.msg
                                    });
                                }
                            }
                        })

                    })
                }

                
            },
            //添加房源图
            addpic(){
                this.picdialogVisible = true;
            },
            //查看房源图列表
            picFun(data=Object()){
                //房源图列表
                data.id = this.r_id;
                conf.room.imageslists(data,(state,res)=>{
                    if (state == 'success'&&res.data.code == 0){
                        // console.log(res);
                        this.piclist = res.data.data;   //图片列表
                        this.cities = res.data.data;  //多选图片列表
                        for(var i=0; i<this.piclist.length; i++){
                            this.piclist[i].name = this.piclist[i].rid_name;
                            this.piclist[i].url = this.piclist[i].rid_url;
                        }
                        //预览图
                        if(this.piclist.length > 0){
                            this.nowPic = this.piclist[0].url;
                            this.nowPictip = '上传人：' + this.piclist[0].rid_name + ',   上传时间：' + this.piclist[0].rid_time;
                        }
                        
                        // console.log(this.cities,this.piclist);
                    }else if(state == 'success'&&res.data.code != 0){
                        if(res.data.code == 401){
                            this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.data.msg
                            });
                        }
                    }
                })

                this.piclistdialogVisible = true;  //
            },
            //预览图片
            previewpic(file){
                // console.log(file);
                this.nowPic = file.url;
                this.nowPictip = '上传人：' + file.rid_name + ',   上传时间：' + file.rid_time;
            },
            //提交添加房源图
            submitpic(formName,data=Object()){
                this.$refs[formName].validate((valid) => {
                    if (valid) {

                        if(this.fileList.length == 0){
                            this.$message({
                                type: 'info',
                                message: "请选择需要上传的图片"
                            });
                            return;
                        }

                        if(this.picform.wate == 1){
                            if(this.picform.position == ""){
                                this.$message({
                                    type: 'info',
                                    message: "请选择水印位置"
                                });
                                return;
                            }
                        }
                        
                        var fd = new FormData();//通过form数据格式来传
                        fd.append("token", window.localStorage.token); //传其他参数
                        console.log(this.fileList);
                        for(var i=0; i<this.fileList.length; i++){
                            fd.append('files[]',this.fileList[i].raw);
                        }
                        fd.append("r_id", this.r_id); //传其他参数
                        fd.append("wate", this.picform.wate); //传其他参数
                        fd.append("position", this.picform.position); //传其他参数

                        conf.room.roomuploadimg(fd,(state,res)=>{
                            if (state == 'success'&&res.data.code == 0){
                                // console.log(res);
                                this.$message({
                                    type: 'success',
                                    message: '添加成功'
                                });
                                //刷新房源图列表
                                this.picFun();
                                this.picdialogVisible = false;
                                //初始化
                                this.$refs[formName].resetFields();
                                this.$refs.upload.clearFiles();
                                this.fileList = [];  
                            }else if(state == 'success'&&res.data.code != 0){
                                if(res.data.code == 401){
                                    this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.data.msg
                                    });
                                }
                            }
                        })

                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });
            },
            //取消添加房源图
            cancelpic(formName){
                this.picdialogVisible = false;
                this.$refs[formName].resetFields();
            },
            //点击文件列表中已上传的文件时的钩子	
            handlePictureCardPreview(file) {
                console.log(file);
                this.picdialogImageUrl = file.url;
                this.detailspicdialogVisible = true;
            },
            // 上传图片
            upload(){
                let url = conf.baseurl + 'room/uploadimg';
                return url;
            },
            // 上传文件之前
            beforeAvatarUpload(file) {
                // console.log(file);
                const isJPG = file.type === 'image/png' || 'image/jpg' || 'image/gif' || 'image/PNG' || 'image/JPG' || 'image/GIF';
                const isLt25M = file.size / 1024 / 1024 <= 25;

                if (!isJPG) {
                    this.$message.error('上传头像图片只能是 png、jpg、gif 格式!');
                }
                if (!isLt25M) {
                    this.$message.error('上传头像图片大小不能超过 25MB!');
                }
                return isJPG && isLt25M;
            },
            //自定义上传
            uploadSectionFile(file){
                // console.log(file);
            },
            //上传图片change
            changeuploadFile(file, fileList){
                // console.log(file, fileList);
                this.fileList = fileList;
            },
            //图片预览  单击
            storageDetail(index){
                // console.log(url,name,time,index);
                // this.nowPictip = '上传人：' + name + ',   上传时间：' + time;
                this.carouselChange(index)
                this.$refs.carousel.setActiveItem(index);   //设置走马灯  当前显示的图片  
            },
            //双击  放大查看
            dbllookpic(){
                console.log(this.nowPic);
                this.dbllookpicdialogvisible = true;
            },
            //全选 change
            handleCheckAllChange(val) {
                // console.log('全选',val,this.cities);
                let checkedarr = [];
                for(var i=0;i<this.cities.length;i++){
                    checkedarr.push(this.cities[i].riu_id);
                }
                this.checkedCities = val ? checkedarr : [];
                this.isIndeterminate = false;
            },
            //选择图片  change
            handleCheckedCitiesChange(value) {
                // console.log('选择当前',value);
                this.nowchoosepic = value;  //当前选中的图片
                let checkedCount = value.length;
                this.checkAll = checkedCount === this.cities.length;
                this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
            },
            //键盘按键
            carouselKeyProess(index){
                // console.log(">>>"+index)
                if(index>0){
                    this.$refs.carousel.next(); 
                }else if(index < 0){
                    this.$refs.carousel.prev(); 
                }
                this.nowval = index==undefined?this.nowval:(this.nowval + index)>this.cities.length?0:((this.nowval + index)<0?this.cities.length-1:this.nowval+index);
                
            },
            //幻灯片  change
            carouselChange(cur, prev){
                this.nowval = cur;
                this.nowPic =  this.cities[this.nowval].rid_url;  
                this.nowPictip = '上传人：' + this.cities[this.nowval].rid_name + ',   上传时间：' + this.cities[this.nowval].rid_time;
                
            },
            //关闭楼盘字典弹框
            dialogstatus(){
                this.lpzdcenterDialogVisible = false;
            },
            //获取部门
            obtainName(data=Object()){

                if(this.tjstatus == 1){  //添加
                    conf.department.nameOpt(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            this.optionName = res.data.data;
                            // console.log(res); 
                        }else if(state == 'success'&&res.data.code != 0){
                            if(res.data.code == -404){
                                this.optionName = [];
                            }else if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                        }
                    }, 'qx_room_tianjia')
                }else if(this.tjstatus == 2){  //修改

                    conf.department.nameOpt(data,(state,res)=>{
                        if (state == 'success'&&res.data.code == 0){
                            this.optionName = res.data.data;
                            // console.log(res); 
                        }else if(state == 'success'&&res.data.code != 0){
                            if(res.data.code == -404){
                                this.optionName = [];
                            }else if(res.data.code == 401){
                                this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.data.msg
                                });
                            }
                        }
                    })
                }
            },
            //获取部门员工
            obtainUsers(val,data=Object()){
                // this.form.source_uid = '';
                this.userTypes = [];
                data.d_id = val;
                // var ownerPermission = window.localStorage.getItem('authories');
                // var arr = ownerPermission.split(',');
                // if(arr.indexOf(permconfig.qx_room_benren_tianjia)  > -1){
                //     this.userTypes = [{
                //         "u_id":window.localStorage.getItem('uid'),
                //         "u_username":window.localStorage.getItem("uname")
                //     }]
                //     return;
                // }
                conf.department.userOpt(data,(state,res)=>{
                    if (state == 'success'&&res.data.code == 0){
                        // console.log(res); 
                        this.userTypes = res.data.data;
                    }else if(state == 'success'&&res.data.code != 0){
                        if(res.data.code == 401){
                            this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.data.msg
                            });
                        }
                    }
                })
            },
            //获取部门员工(房源跟进)
            obtainuser(val,data=Object()){
                this.usertypes = [];
                this.followform.f_user_id = '';
                data.d_id = val;
                conf.department.userOpt(data,(state,res)=>{
                    if (state == 'success'&&res.data.code == 0){
                        // console.log(res); 
                        this.usertypes = res.data.data;
                    }else if(state == 'success'&&res.data.code != 0){
                        if(res.data.code == 401){
                            this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.data.msg
                            });
                        }
                    }
                })
            },
            //获取部门员工(房源跟进  客源列表 查询)
            obtainusers(val,data=Object()){
                this.usertypess = [];
                this.customerform.c_employees_id = '';
                data.d_id = val;
                conf.department.userOpt(data,(state,res)=>{
                    if (state == 'success'&&res.data.code == 0){
                        // console.log(res); 
                        this.usertypess = res.data.data;
                    }else if(state == 'success'&&res.data.code != 0){
                        if(res.data.code == 401){
                            this.$router.push({name:'login'});   //登陆态失效，跳转至登录页
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.data.msg
                            });
                        }
                    }
                })
            },
// ********************************************** start 配置特殊键
            inkeys(key, obj){
                for(var k in obj){
                    if(k == key){
                        return {k:k,v:obj[k]};
                    }
                }
                return false;
            },
            room_s_onkeypress(event){
                var k1 = {"48":"0","49":"1","50":"2","51":"3","52":"4","53":"5","54":"6","55":"7","56":"8","57":"9","106":"*","96":"0","97":"1","98":"2","99":"3","100":"4","101":"5","102":"6","103":"7","104":"8","105":"9"};
                var vv = {
                    "*":"*",
                    "0":"0",
                    "1":"1",
                    "2":"2",
                    "3":"3",
                    "4":"4",
                    "5":"5",
                    "6":"6",
                    "7":"7",
                    "8":"8",
                    "9":"9",
                    "11":"1b",
                    "22":"2b",
                    "33":"3b",
                    "44":"4b",
                    "55":"5b"
                },
                curkey = "",
                _this = this;

                var kv = this.options.roomtype;
                event.target.onkeyup = function(ev){
                    var op = null,item = null;
                    if(op = _this.inkeys(ev.keyCode, k1)){
                        curkey+=op.v;
                        if(!_this.inkeys(curkey, vv)){
                            curkey = op.v;
                        }
                        if(item = _this.inkeys(curkey, vv)){
                            for(var i in kv){
                                if(kv[i].st_name == item.v){
                                    _this.form.r_info.room_s = kv[i].st_id;
                                }
                            }
                        }
                    }
                };
            },
            office_s_onkeypress(event){
                var k1 = {"48":"0","49":"1","50":"2","51":"3","52":"4","53":"5","54":"6","55":"7","56":"8","57":"9","106":"*","96":"0","97":"1","98":"2","99":"3","100":"4","101":"5","102":"6","103":"7","104":"8","105":"9"};
                var vv = {
                    "0":"0",
                    "1":"1",
                    "2":"2",
                    "3":"3",
                    "4":"4",
                    "5":"5",
                    "6":"6"
                },
                curkey = "",
                _this = this;

                var kv = this.options.hall;
                event.target.onkeyup = function(ev){
                    var op = null,item = null;
                    if(op = _this.inkeys(ev.keyCode, k1)){
                        curkey+=op.v;
                        if(!_this.inkeys(curkey, vv)){
                            curkey = op.v;
                        }
                        if(item = _this.inkeys(curkey, vv)){
                            for(var i in kv){
                                if(kv[i].st_name == item.v){
                                    _this.form.r_info.office_s = kv[i].st_name;
                                }
                            }
                        }
                    }
                };
            },
            guard_s_onkeypress(event){
                var k1 = {"48":"0","49":"1","50":"2","51":"3","52":"4","53":"5","54":"6","55":"7","56":"8","57":"9","106":"*","96":"0","97":"1","98":"2","99":"3","100":"4","101":"5","102":"6","103":"7","104":"8","105":"9"};
                var vv = {
                    "0":"0",
                    "1":"1",
                    "2":"2",
                    "3":"3",
                    "4":"4",
                    "5":"5",
                    "6":"6"
                },
                curkey = "",
                _this = this;

                var kv = this.options.guard;
                event.target.onkeyup = function(ev){
                    var op = null,item = null;
                    if(op = _this.inkeys(ev.keyCode, k1)){
                        curkey+=op.v;
                        if(!_this.inkeys(curkey, vv)){
                            curkey = op.v;
                        }
                        if(item = _this.inkeys(curkey, vv)){
                            for(var i in kv){
                                if(kv[i].st_name == item.v){
                                    _this.form.r_info.guard_s = kv[i].st_name;
                                }
                            }
                        }
                    }
                };
            },
            balcony_s_onkeypress(event){
                var k1 = {"48":"0","49":"1","50":"2","51":"3","52":"4","53":"5","54":"6","55":"7","56":"8","57":"9","106":"*","96":"0","97":"1","98":"2","99":"3","100":"4","101":"5","102":"6","103":"7","104":"8","105":"9"};
                var vv = {
                    "0":"0",
                    "1":"1",
                    "2":"2",
                    "3":"3",
                    "4":"4",
                    "5":"5",
                    "6":"6"
                },
                curkey = "",
                _this = this;

                var kv = this.options.balcony;
                event.target.onkeyup = function(ev){
                    var op = null,item = null;
                    if(op = _this.inkeys(ev.keyCode, k1)){
                        curkey+=op.v;
                        if(!_this.inkeys(curkey, vv)){
                            curkey = op.v;
                        }
                        if(item = _this.inkeys(curkey, vv)){
                            for(var i in kv){
                                if(kv[i].st_name == item.v){
                                    _this.form.r_info.balcony_s = kv[i].st_id;
                                }
                            }
                        }
                    }
                };
            },
// ******************************************************** end 配置特殊键结束    
        },
        created (){
            this.$nextTick(function(){
                this.pagetype();  //页面状态  （修改、添加）
                this.optlist();  //房源下拉数据
                this.custoptlist(); //客源下拉数据
                this.obtainName();  //部门下拉
                // this.obtainUsers();  //部门员工
            })
        },

    }


   
</script>